In [11]: factor(_)
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (33, 0))
---------------------------------------------------------------------------
CoefficientError Traceback (most recent call last)
/home/nbecker/jupiter/<ipython console> in <module>()
/usr/lib/python2.6/site-packages/sympy-0.6.5-
py2.6.egg/sympy/polys/factortools.pyc in factor(f, *symbols, **flags)
78 return f
79
---> 80 coeff, factors = poly_factors(f, *symbols, **flags)
81
82 result = 1 # XXX: don't include coeff in the leading factor
/usr/lib/python2.6/site-packages/sympy-0.6.5-
py2.6.egg/sympy/polys/factortools.pyc in poly_factors(f, *symbols, **flags)
35
36 F = Poly(f, *symbols)
---> 37 denom, F = F.as_integer()
38
39 cont, factors = zzX_factor(zzX_from_poly(F))
/usr/lib/python2.6/site-packages/sympy-0.6.5-
py2.6.egg/sympy/polys/polynomial.pyc in as_integer(self)
1295 coeffs.append(Integer(int(coeff)))
1296 else:
-> 1297 raise CoefficientError("%s is not a rational number" %
coeff)
1298
1299 denom = sympify(denom)
CoefficientError: 3.23600000000000 is not a rational number
In [12]:
On Mon, Nov 2, 2009 at 11:31 AM, Neal Becker <ndbe...@gmail.com> wrote:
>
> Out[7]: (1 + s)*(1 + 0.618*s + s**2)*(1 + 1.618*s + s**2)
> ...
> In [10]: expand (_)
> Out[10]: 1 + 3.236*s + 5.235924*s**2 + 5.235924*s**3 + 3.236*s**4 + s**5
>
> In [11]: factor(_)
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (33, 0))
I think this bug is fixed by the Mateusz new polynomials branch. We
didn't manage to merge it yet, but we'll do it soon.
Ondrej