[SciPy-Dev] ode and odeint callable parameters

Irvin Probst irvin.probst at ensta-bretagne.fr
Wed Jan 20 06:26:41 EST 2016


On 20/01/2016 11:28, Marcel Oliver wrote:
> * integrate.ode seems to have the more "pythonic" interface and a
>    larger choice of integrator.  However, most of the integrators are
>    not re-entrant per warning in the documentation, so the object
>    oriented call signature is actually sending a false message.  In
>    addition, in many (if not most) applications, I need the solution at
>    an array of times, and often need to post-process the entire time
>    series as an array.  Thus, I find the call signature of
>    integrate.ode extremely annoying and avoid it in favor of odeint
>    (when the latter works) even though integrate.ode is the more
>    powerful package.
And THIS is why a vast majority of the students here use odeint and not 
ode if we don't tell them which one to use, actually even the official 
documentation seems to imply that odeint should be used instead of ode, 
that's written in a yellow box almost at the top of 
http://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.integrate.ode.html 
:

See also:
odeint: an integrator with a simpler interface based on lsoda from ODEPACK

I think that almost all newcomers who see "simpler" will run to odeint 
and never come back to ode, and that is imho espacially true for people 
coming from Matlab as odeint can be used almost exactly like ode45 & co.

Fortunately we never have to deal with systems who would require an 
integrator on steroids so odeint is good enough (actually even a custom 
RK2 with fixed step size is good enough in most cases...).

I trust Benny Malengier when he says that having an unified interface 
for all available ODEs is not a trivial task and I wouldn't dare 
touching this, but at least it would be great to have an unified 
prototype for the callbacks.

Regards.




More information about the SciPy-Dev mailing list