Keywords: scipy solve_ivp callback ODE ordinary-differential-equation IVP initial-value-problem python
add a callback function to the scipy ODE solver solve_ivp, so that you can
- print progress at each timestep
- tell the solver to stop if
h
is too small or KeyboardInterrupt or ..., and return thesol
so far.