Not Implemented Error when solving a equation system
28 views
Skip to first unread message
rgbarriada
unread,
Apr 3, 2014, 5:58:11 AM4/3/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
Hi all,
I am trying to solve a very simple equation system. Here is the code:
import sympy as sp a, b, c, d = sp.S('a b c d'.split()) equations =[ sp.Eq(a, b+c/d), sp.Eq(c,60.), sp.Eq(d,5.)]
print sp.solve(equations)
So I can have an expression for 'a' as a function of 'b'.
I am getting this error instead:
... File "/usr/lib/python2.7/dist-packages/sympy/solvers/solvers.py", line 484, in solve solution = _solve(f, *symbols, **flags) File "/usr/lib/python2.7/dist-packages/sympy/solvers/solvers.py", line 730, in _solve raise NotImplementedError() NotImplementedError
I am using sympy 0.7.1.
Any hint of what I am doing wrong?
Thanks in advance
Mateusz Paprocki
unread,
Apr 3, 2014, 8:58:11 AM4/3/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
Hi,
Nothing, besides using an older version of SymPy. If you try 0.7.5 (or
0.7.4), your example works perfectly there. Note that you can still
encounter NotImplementedError in case of equations/systems that SymPy
doesn't support. Also, may I suggest using exact numbers, i.e. 60
instead of 60., unless you really want to use a numerical solver (if
this is how SymPy works in this particular case).