[Scipy-tickets] [SciPy] #792: func in scipy.integrate.ode has different signature with respect to scipy.integrate.odeint

SciPy scipy-tickets@scipy....
Tue Nov 18 05:22:43 CST 2008


#792: func in scipy.integrate.ode has different signature with respect to
scipy.integrate.odeint
-----------------------------+----------------------------------------------
 Reporter:  emanuele         |       Owner:  somebody
     Type:  defect           |      Status:  new     
 Priority:  normal           |   Milestone:          
Component:  scipy.integrate  |     Version:          
 Severity:  normal           |    Keywords:          
-----------------------------+----------------------------------------------
 scipy.integrate.ode and scipy.integrate.odeint provide different
 algorithms to solve ODEs. They both rely on a user-defined function that
 describes the ODE system, called "func", which has at least two arguments:
 y and t (current value and timestep). The signature of func is different
 in the two subpackges (func(y,t) <-> func(t,y)), which is definitely
 unexpected and annoying since it forces the user to change his code more
 than necessary in order to run both ODE solvers on the same problem.
 Unifying these interfaces would be a meaningful improvement for future
 SciPy releases.

 From the current docstrings:

 * scipy.integrate.odeint:
 {{{
 Inputs:

       func -- func(y,t0,...) computes the derivative of y at t0.
 }}}
 * scipy.integrate.ode:
 {{{
 where f and jac have the following signatures:
         def f(t,y[,arg1,..]):
             return <f(t,y)>
 }}}

 After some discussion on SciPy-user mailing list:

 * Pauli Virtanen suggests to deprecate both ode and odeint and write a new
 unified interface.

 * Rob Clewley mentions that Gabriel Gellner has started to do that here:
 https://launchpad.net/pyode but the code is not yet available.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/792>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list