Comment #5 on issue 3667 by smi...@gmail.com: getting consistent output from solve until a Solution class is available
http://code.google.com/p/sympy/issues/detail?id=3667

Another inconsistent output is that it can return a generator:

radsimp(1/(root(2,3)+root(2,5)))
1/(2**(1/5) + 2**(1/3))
minpoly(_)
40*_x**15 + 240*_x**14 + 240*_x**13 - 80*_x**12 + 1080*_x**11 - 12*_x**10 + 80*_
x**9 + 360*_x**8 - 40*_x**6 + 6*_x**5 + 10*_x**3 - 1
eq=_
sol=solve(eq,check=0)
len(sol)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: object of type 'generator' has no len()

and this is not fixed by requesting a dict output

sol=solve(eq,check=0,dict=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sympy\solvers\solvers.py", line 992, in solve
    elif iterable(solution[0]):
TypeError: 'generator' object has no attribute '__getitem__'


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to