[SciPy-user] Bug in scipy.integrate.odeint ?
Thu Nov 1 09:27:38 CDT 2007
I find the behaviour of scipy.integrate.odeint very strange :
>>> from numpy import *
>>> from scipy import integrate
>>> def f(x, t):
... return cos(x)
>>> X0 = array([0.0])
>>> X0_ini = X0.copy()
>>> t = linspace(0, 20., 200)
>>> X = integrate.odeint(f, X0, t)
>>> X0 == X0_ini
>>> X0 == X[-1]
Why do odeint modify X0 ?
Is there any reason for this ?
For me, it seems really like a bug and could easily lead to bugs if
there's no mention of this in the doc string.
More information about the SciPy-user