We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi everyone. Thanks for your work on sympy.
I came across an issue when trying to solve a system of equations, and I reduced it to the following example:
>>> solve([z + y/x, - (z + y/x)], [x, y, z]) Traceback (most recent call last): ... NotImplementedError: no valid subset found >>> solve([z + y/x, z + y/x], [x, y, z]) Traceback (most recent call last): ... NotImplementedError: no valid subset found
I would have expected x == -y/z as an answer, and indeed, this is what sympy returns if the second (redundant) equation is removed:
x == -y/z
>>> solve([z + y/x], [x, y, z]) [( -y/z, y, z )]
(I verified these tests on https://live.sympy.org/, but I came across them using sympy through sagemath.)
The text was updated successfully, but these errors were encountered:
I can confirm this with latest sympy master:
In [1]: solve([z + y/x, - (z + y/x)], [x, y, z]) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) <ipython-input-1-07dae630f90a> in <module> ----> 1 solve([z + y/x, - (z + y/x)], [x, y, z]) ~/current/sympy/sympy/sympy/solvers/solvers.py in solve(f, *symbols, **flags) 1095 solution = _solve(f[0], *symbols, **flags) 1096 else: -> 1097 solution = _solve_system(f, symbols, **flags) 1098 1099 # ~/current/sympy/sympy/sympy/solvers/solvers.py in _solve_system(exprs, symbols, **flags) 1866 solved_syms = list(got_s) 1867 else: -> 1868 raise NotImplementedError('no valid subset found') 1869 else: 1870 try: NotImplementedError: no valid subset found
Not sure what that code in _solve_system is doing...
_solve_system
Sorry, something went wrong.
Add regression test
9fa683c
Closes sympy/sympy#21766
No branches or pull requests
Hi everyone. Thanks for your work on sympy.
I came across an issue when trying to solve a system of equations, and I reduced it to the following example:
I would have expected
x == -y/z
as an answer, and indeed, this is what sympy returns if the second (redundant) equation is removed:(I verified these tests on https://live.sympy.org/, but I came across them using sympy through sagemath.)
The text was updated successfully, but these errors were encountered: