[SciPy-user] Caveat About integrate.odeint
Thu Oct 25 10:40:02 CDT 2007
On 25/10/2007, Lorenzo Isella <email@example.com> wrote:
> I do not know if what I am going to write is really useful (maybe it
> is pretty obvious for everybody on this list).
> I have been using integrate.odeint for quite a while to solve some
> population equations.
> Then I made a trivial change (nothing leading to different physics or
> in general such as to justify any substantial difference with the
> previous results), and I woke up in a nightmare: precision errors,
> routine crashing etc...
> I think I now what happened: in my code I was using t [time], T(t)
> [time-dependent temperature], t_0 (initial time) and T_0 (initial
> For Python there is no possibility of confusion, but the underlying
> Fortran made a mess out of this...
> Something very trivial, but it took me a day and a half to debug this.
> Hope it was useful.
Do you have a small piece of demo code? This is very surprising, as
FORTRAN should never see the variable names. I can't replicate it in
spite of headache-inducing variable names:
In : T = lambda t, T: T
In : T0 = 1
In : t = [0,1,2]
In : scipy.integrate.odeint(T,T0,t)
array([[ 1. ],
More information about the SciPy-user