Skip to content

Conversation

@emanuel-schmid
Copy link
Collaborator

@emanuel-schmid emanuel-schmid commented Dec 4, 2023

Changes proposed in this PR:

  • skip case distinction in yearsets.sample_from_poisson

This PR fixes #819

PR Author Checklist

PR Reviewer Checklist

else:
events_per_year = np.ones(len(n_sampled_years))

return np.round(np.random.poisson(lam=lam, size=n_sampled_years)).astype('int')
Copy link
Member

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?

Copy link
Collaborator Author

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.

@chahank chahank merged commit a8cb0d2 into develop Dec 12, 2023
@emanuel-schmid emanuel-schmid deleted the feature/fix_sample_from_poisson branch December 13, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sample_from_poisson fails if lam is 1

3 participants