Reputation: 11
I am trying to solve a very simple ODE using the dsolve sympy function:
from sympy import*
init_printing()
t = symbols('t', real = True)
A = symbols('A', complex = True)
f = Function('rho')(t)
dsolve(Derivative(f, t)+A*f, f)
But, then I get:
Traceback (most recent call last):
File "<ipython-input-9-3d1f21a5ef22>", line 1, in <module>
dsolve(Derivative(f, t)+A*f, f)
File "/home/ted/anaconda3/lib/python3.6/site-packages/sympy/solvers/ode.py", line 566, in dsolve
hints = _desolve(eq, func=func, hint=hint, simplify=True, xi=xi, eta=eta, type='ode', ics=ics, x0=x0, n=n, **kwargs)
File "/home/ted/anaconda3/lib/python3.6/site-packages/sympy/solvers/deutils.py", line 205, in _desolve
n=terms, x0=x0, prep=prep)
File "/home/ted/anaconda3/lib/python3.6/site-packages/sympy/solvers/ode.py", line 1251, in classify_ode
r = _nth_linear_match(reduced_eq, func, order)
File "/home/ted/anaconda3/lib/python3.6/site-packages/sympy/solvers/ode.py", line 3723, in _nth_linear_match
terms[f.derivative_count] += c
AttributeError: 'Derivative' object has no attribute 'derivative_count'
The sympy version is 1.1.1, the python version is 3.6.4 and the ipython version is 6.2.1.
Upvotes: 0
Views: 303
Reputation: 11
My bad! I tried to use one of the files (ode.py) from the current development version without updating the rest. Now I have it working. Thanks!
Upvotes: 1