[SciPy-user] scipy.odeint args question

Steve Schmerler elcorto@gmx....
Wed Jun 6 02:02:52 CDT 2007


Warren Weckesser wrote:
> Pass the list "param" to odeint like this:
> 
>   y = scipy.odeint(f, x0, t, args = (param,), Dfun = J)
> 
> Note the extra comma.
> 
> Then, for example, f might start like this:
> 
>   def f(x,t,param)
>       a = param[0]
>       b = param[1]
>       c = param[2]
>       ...
>       return dxdt
> 

See also http://docs.python.org/tut/node7.html#SECTION007300000000000000000

-- 
cheers,
steve

I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams



More information about the SciPy-user mailing list