Updates:
Status: WontFix
Comment #1 on issue 1332 by mattpap: problem with eigenvalue example
http://code.google.com/p/sympy/issues/detail?id=1332
Shortly speaking this is not a bug. In version 0.6.3 there were two
alternative
implementations of polynomials in sympy. In the example given, you are
mixing Poly
class from one implementation and roots from the other, but they can't work
together.
To overcome this difficulty you should use:
from sympy.polynomials import roots
r = roots(x**3 - 8*x**2 + 17*x - 10, x)
or
from sympy.polys import roots
r = roots(x**3 - 8*x**2 + 17*x - 10, x)
or
from sympy.polys import roots
f = Poly(x**3 - 8*x**2 + 17*x - 10, x)
r = roots(f)
However, I strongly recommend to use sympy.polys because in 0.6.4 it will
be the
implementation of choice.
Examples (0.6.4.beta1):
In [1]: roots(x**3 - 8*x**2 + 17*x - 10, x)
Out[1]: {1: 1, 2: 1, 5: 1}
In [2]: f = Poly(x**3 - 8*x**2 + 17*x - 10, x)
In [3]: roots(f)
Out[3]: {1: 1, 2: 1, 5: 1}
The following is invalid input:
In [4]: roots(f, x)
---------------------------------------------------------------------------
SymbolsError Traceback (most recent call last)
/home/matt/repo/git/sympy/<ipython console> in <module>()
/home/matt/repo/git/sympy/sympy/polys/rootfinding.pyc in roots(f, *symbols,
**flags)
190 f = Poly(f, *symbols)
191 elif symbols:
--> 192 raise SymbolsError("Redundant symbols were given")
193
194 if f.is_multivariate:
SymbolsError: Redundant symbols were given
because 'f' already holds information about symbols.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---