why signature of func in odeint != ode ?
![](https://secure.gravatar.com/avatar/14577d49b8c9ee623b1cbab3c41fb4f0.jpg?s=120&d=mm&r=g)
Why signature of func in odeint is swapped (y,t0 -> t0,y) with respect to func in ode ? It would be nice to have same signature in order to be able to play with both of them more transparently. Details from 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)> ---- Is there a reason for this or is it just a little defect? Regards, Emanuele
![](https://secure.gravatar.com/avatar/da3a0a1942fbdc5ee9a9b8115ac5dae7.jpg?s=120&d=mm&r=g)
Mon, 17 Nov 2008 17:38:06 +0100, Emanuele Olivetti wrote:
Why signature of func in odeint is swapped (y,t0 -> t0,y) with respect to func in ode ?
Legacy -- I'd guess the two interfaces were written by different authors. I'm not sure if this API break can be made the moment. One possible way forward could be to deprecate both `ode` and `odeint` and write a new unified interface for LSODA, *VODE, etc. -- Pauli Virtanen
![](https://secure.gravatar.com/avatar/790fd6e3ccfeaf2865c9294d2df0fa3e.jpg?s=120&d=mm&r=g)
On Mon, Nov 17, 2008 at 2:03 PM, Pauli Virtanen <pav@iki.fi> wrote:
I'm not sure if this API break can be made the moment. One possible way forward could be to deprecate both `ode` and `odeint` and write a new unified interface for LSODA, *VODE, etc.
I believe Gabriel Gellner had started trying to do this, but his project seems not to have any code online when I just checked. https://launchpad.net/pyode Fixing this with a unified interface would be an important milestone towards scipy 1.0 -Rob
![](https://secure.gravatar.com/avatar/b0ea6746ff332efedba70843116f9b84.jpg?s=120&d=mm&r=g)
hi, another option that comes immediately to mind is to use SWIG to expose your C++ code to python. That is what we are doing routinely in my work. HTH, Johann Rob Clewley wrote:
On Mon, Nov 17, 2008 at 2:03 PM, Pauli Virtanen <pav@iki.fi> wrote:
I'm not sure if this API break can be made the moment. One possible way forward could be to deprecate both `ode` and `odeint` and write a new unified interface for LSODA, *VODE, etc.
I believe Gabriel Gellner had started trying to do this, but his project seems not to have any code online when I just checked.
Fixing this with a unified interface would be an important milestone towards scipy 1.0
-Rob _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/14577d49b8c9ee623b1cbab3c41fb4f0.jpg?s=120&d=mm&r=g)
Rob Clewley wrote:
On Mon, Nov 17, 2008 at 2:03 PM, Pauli Virtanen <pav@iki.fi> wrote:
I'm not sure if this API break can be made the moment. One possible way forward could be to deprecate both `ode` and `odeint` and write a new unified interface for LSODA, *VODE, etc.
I believe Gabriel Gellner had started trying to do this, but his project seems not to have any code online when I just checked.
Fixing this with a unified interface would be an important milestone towards scipy 1.0
So I assume it is OK to file a ticket to the SciPy trac (792): http://scipy.org/scipy/scipy/ticket/792 Please review it and add any missing info. Regards, Emanuele
participants (4)
-
Cohen-Tanugi Johann
-
Emanuele Olivetti
-
Pauli Virtanen
-
Rob Clewley