Skip to content

Commit

Permalink
Fix numpy v1.24 compatibility
Browse files Browse the repository at this point in the history
Numpy v1.24 deprecated ragged arrays unless dtype=object
is passed (numpy/numpy#22004). The SimulationResult class
needs to support different length entries in tout in the
case that these differ across simulations. PySB shouldn't
convert these to a numpy array, instead preferring to
keep them as a list/iterable.
  • Loading branch information
alubbock committed Mar 28, 2023
1 parent 8819eaa commit ee3d147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysb/simulator/base.py
Expand Up @@ -748,7 +748,7 @@ def __init__(self, simulator, tout, trajectories=None,
self.run_kwargs = {}

self.squeeze = squeeze
self.tout = np.asarray(tout)
self.tout = tout
self._yfull = None
self.n_sims_per_parameter_set = simulations_per_param_set
self.pysb_version = PYSB_VERSION
Expand Down

0 comments on commit ee3d147

Please sign in to comment.