Change names and pass tests

This commit is contained in:
Benjamin Bertrand
2017-04-17 16:48:52 +03:00
parent 30a6402e40
commit 500426bf82
54 changed files with 103 additions and 87 deletions

8
bugs
View File

@@ -43,7 +43,7 @@
In [4]: e = Expression("1+2*3")
In [5]: e + P
Out[5]: < <class 'pymath.expression.Expression'> [1, 2, 3, '*', '+', < Polynom [1, 2, 1]>, '+'] >
Out[5]: < <class 'mapytex.expression.Expression'> [1, 2, 3, '*', '+', < Polynom [1, 2, 1]>, '+'] >
In [6]: P + e
---------------------------------------------------------------------------
@@ -51,14 +51,14 @@
<ipython-input-6-ff312ef36cdb> in <module>()
----> 1 P + e
/home/lafrite/scripts/pyMath/pymath/polynom.py in __add__(self, other)
430 [< <class 'pymath.expression.Expression'> [3, 'x', 2, '^', '*', 2, 'x', '*', '+', 1, '+', 5, 'x', '*', 4, '+', '+'] >, < Polynom [< <class 'pymath.expression.Expression'> [1, 4, '+'] >, < <class 'pymath.expression.Expression'> [2, 5, '+'] >, 3]>, < Polynom [< <class 'pymath.expression.Expression'> [1, 4, '+'] >, < <class 'pymath.expression.Expression'> [2, 5, '+'] >, 3]>]
/home/lafrite/scripts/Mapytex/mapytex/polynom.py in __add__(self, other)
430 [< <class 'mapytex.expression.Expression'> [3, 'x', 2, '^', '*', 2, 'x', '*', '+', 1, '+', 5, 'x', '*', 4, '+', '+'] >, < Polynom [< <class 'mapytex.expression.Expression'> [1, 4, '+'] >, < <class 'mapytex.expression.Expression'> [2, 5, '+'] >, 3]>, < Polynom [< <class 'mapytex.expression.Expression'> [1, 4, '+'] >, < <class 'mapytex.expression.Expression'> [2, 5, '+'] >, 3]>]
431 """
--> 432 o_poly = self.conv2poly(other)
433
434 n_coef = spe_zip(self._coef, o_poly._coef)
/home/lafrite/scripts/pyMath/pymath/polynom.py in conv2poly(self, other)
/home/lafrite/scripts/Mapytex/mapytex/polynom.py in conv2poly(self, other)
319 return other
320 else:
--> 321 raise ValueError(type(other) + " can't be converted into a polynom")