fix yearsets.sample_from_poisson by emanuel-schmid · Pull Request #823 · CLIMADA-project/climada_python

@emanuel-schmid

@emanuel-schmid

chahank

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.