Python scipy ode dopri5 'need more nmax'

When using scipy 0.13.0 , ode(f).set_integrator('dopri5')

I am getting an error -

larger nmax is needed

I have searched nmax

in ode.py

, but I cannot see this variable. I am assuming that the call to the integration number exceeds the allowed default.

How to increase the nmax value?

+3


source to share


1 answer


nmax

refers to the maximum number of internal steps the solver takes. The default is 500. You can change this using the nsteps

method argument set_integrator

. For example.

ode(f).set_integrator('dopri5', nsteps=1000)



(The Fortran code calls this nmax

, and apparently the Fortran name was copied into the error message in the python code for the "dopri5" solver. In the class API, ode

all the solvers ("dopri5", "vode", "lsoda", etc.) .) consistently call this parameter solver nsteps

, so scipy has to change the error message used in python code to say nsteps

.)

+3


source







All Articles