Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Medium Solvers Polynomial
New issue 2257 by asmeurer: solve([x**2-1],[x,y]) should be the same as
solve(x**2-1,[x,y])
http://code.google.com/p/sympy/issues/detail?id=2257
See comment 6 of issue 1673 (quoted below):
While this works as expected:
In [1]: solve(x**2-1,[x,y])
Out[1]: {x: [1, -1], y: []}
Giving the equation in a list produces an error:
In [2]: solve([x**2-1],[x,y])
---------------------------------------------------------------------------
PolynomialError Traceback (most recent call last)
/Users/Jan/<ipython console> in <module>()
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sympy/solvers/solvers.pyc
in
solve(f, *symbols, **flags)
383 soln = solve_linear_system(matrix, *symbols,
**flags)
384 else:
--> 385 soln = solve_poly_system(polys)
386
387 # Use swap_dict to ensure we return the same type as
what was
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sympy/solvers/polysys.pyc
in
solve_poly_system(system, *symbols)
112 head, tail = f.unify_with(system)
113
--> 114 solutions = solve_reduced_system([head] + tail, True)
115
116 if solutions is None:
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sympy/solvers/polysys.pyc
in
solve_reduced_system(system, entry)
69 f = univariate.pop()
70 else:
---> 71 raise PolynomialError("Not a zero-dimensional system")
72
73 zeros = roots(Poly(f, f.symbols[-1])).keys()
PolynomialError: Not a zero-dimensional system
I think this should be handled consistently.
--
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.