Updates:
Status: WontFix
Labels: Solvers
Comment #1 on issue 2009 by asmeurer: solve((x-y,y),x) is None
http://code.google.com/p/sympy/issues/detail?id=2009
You need to pass both variables:
In [1]: solve([x - y, y], [x, y])
Out[1]: {x: 0, y: 0}
Otherwise, it treats y as a constant, and then the matrix operations assume
that there are no solutions when it gets to y == 0, which looks
inconsistent to it. Actually, Maple does the same thing: solve({x - y, y},
x) and solve({x - y, y}, y) both return nothing, but solve({x - y, y}, {x,
y}) returns {x=0, y=0}.
I should also note that if you pass no variables, it will automatically
choose all of them for you:
In [5]: solve([x - y, y])
Out[5]: {x: 0, y: 0}
As for not being able to do it, it can do it, but it thinks there are no
solutions. The regular solver returns a list of solutions if it can find
them, [] if it thinks there are none, or raises NotImplementedError. The
systems solver (passing a list or tuple to solve) returns a dictionary of
solutions if it finds them, or None if it thinks there are none, or raises
NotImplementedError when it can't do it (such as for polynomial systems
with an infinite solution space).
So I'm going to mark as WontFix, but thanks for reporting (what you thought
was) a bug nonetheless.
--
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.