Domanda

I have read the docs for these here, but it just states that odeint is "an integrator with a simpler interface based on lsoda from ODEPACK"

What is the actual difference? Under what circumstances is using one more appropriate than the other?

È stato utile?

Soluzione

If you can solve your problem with odeint, I would recommend that. It is simply a function that integrates an ode using lsoda.

If you want a lot more options, ode is a class with many methods and solvers:

Altri suggerimenti

I was wondering about the same question, and I found later that there is an other API available in scipy.integrate. The method is clearly explained in the documentation.

It could interest people comparing odeint (odeintw for complex) and ode (complex_ode for complex).

It is called scipy.integrate.solve_ivp, available from scipy v1.0.0 : https://scipy.github.io/devdocs/generated/scipy.integrate.solve_ivp.html#scipy.integrate.solve_ivp In this solver, LSODA cant handle complex but BDF is faster in my case.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top