Skip to content

Commit

Permalink
Fixes fmilthaler#72. Creating a numpy ndarray from ragged nested sequ…
Browse files Browse the repository at this point in the history
…ences is deprecated.

It is now necessary to specify the additional parameter 'dtype=object'.
  • Loading branch information
PietropaoloFrisoni committed Jul 6, 2023
1 parent 7fb3446 commit d027b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion finquant/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run(self, fun, **kwargs):
for i in range(self.num_trials):
res = fun(**kwargs)
result.append(res)
return np.asarray(result)
return np.asarray(result, dtype=object)


class MonteCarloOpt(MonteCarlo):
Expand Down

0 comments on commit d027b60

Please sign in to comment.