mattja / sdeint

Numerical integration of Ito or Stratonovich SDEs
GNU General Public License v3.0
154 stars 25 forks source link

Allow the state y to be an array of arbitrary rank #7

Open mattja opened 7 years ago

mattja commented 7 years ago

Although scipy.integrate.odeint does not support that sort of thing. But hey, why not?

This would then be an improved fix for mattja/nsim#2 , since it's reasonable for people to supply a state of shape (n,1) interpreted as a column vector and expect it to work.

Implement with numpy.ravel on input and numpy.reshape on output but make sure data is not copied during reshape.