Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove any use of legacy NumPy random number generator #538

Merged
merged 3 commits into from
May 6, 2024

Conversation

rhugonnet
Copy link
Member

@rhugonnet rhugonnet commented Apr 27, 2024

For durability, and was creating some RAM issues for choice without replacement on large arrays. Removed np.random.RandomState input type who was just for legacy seeds which we don't need. (more details in GlacioHack/xdem#511)

Resolves #536

@rhugonnet rhugonnet requested a review from adehecq April 27, 2024 22:40
@rhugonnet rhugonnet merged commit 414dc5c into GlacioHack:main May 6, 2024
13 checks passed
@rhugonnet rhugonnet deleted the remove_legacy_rng branch May 6, 2024 04:34
@rhugonnet
Copy link
Member Author

Merging as needed to finalize #537 and GlacioHack/xdem#511

@adehecq
Copy link
Member

adehecq commented May 28, 2024

Good to know that the old way (e.g. np.random.randin) should be avoided, not just for RAM issues on large arrays!

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.

Consistently use NumPy's default random number generator to avoid RAM usage issues from legacy call
2 participants