While nice to not need to remember, the zeroing does nothing for any call other than the first. Elements which already have a value will be overwritten. Elements which are zero don't need to be.
This only needs to be done once, not at every time step.
Either move this loop to the calling function (runge-kutta for now), or add a boolean argument to the function, and hide this behind an if statement.
https://github.com/wright-group/WrightSim/blob/8c23c2431a80f1eb87be6613c69a9db399354be8/WrightSim/hamiltonian/default.py#L288-L289
While nice to not need to remember, the zeroing does nothing for any call other than the first. Elements which already have a value will be overwritten. Elements which are zero don't need to be. This only needs to be done once, not at every time step.
Either move this loop to the calling function (runge-kutta for now), or add a boolean argument to the function, and hide this behind an if statement.