fix yearsets.sample_from_poisson by emanuel-schmid · Pull Request #823 · CLIMADA-project/climada_python
| else: | ||
| events_per_year = np.ones(len(n_sampled_years)) | ||
|
|
||
| return np.round(np.random.poisson(lam=lam, size=n_sampled_years)).astype('int') |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure to understand. This changes the behaviour of the method. Is this desired?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly. The original behavior at lam = 1.0 is inconsistent, see discussion in #820.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters