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
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
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).

> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/4314646e-f6f4-438c-9c68-55ae207117f0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mateusz
Reply all
Reply to author
Forward
0 new messages