Solving complex and array differential equations with odeint
Occasionally on the mailing list and stackoverflow, the question of how to solve a system of differential equations in which the dependent variables are complex or an array is raised. `scipy.integrate.ode` (with the `zvode` integrator) and `scipy.integrate.complex_ode` can handle complex equations, but neither `ode` nor `scipy.integrate.odeint` can handle arrays. To solve an array differential equation with either of them, you have to implement the equations with the array flattened to a 1-d vector. I've created a wrapper of `odeint`, cleverly called `odeintw`, that takes care of wrapping complex and array equations so they can be solved with `odeint`. The github repository is here: https://github.com/WarrenWeckesser/odeintw Eventually, I'll work on getting this into scipy itself, but these days the distribution of "eventually" has a fat tail, so it might be a while. Warren
participants (1)
-
Warren Weckesser