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

ENH: Use NumPy's Generator class as a replacement for RandomState #141

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

jhlegarreta
Copy link
Collaborator

@jhlegarreta jhlegarreta commented Mar 24, 2024

Use NumPy's Generator class as a replacement for RandomState for random variarte generation methods.

RandomState was deprecated in NumPy 1.17.0.

Take advantage of the commit to document better the use of the seed parameter.

Documentation:
https://numpy.org/doc/stable/reference/random/new-or-different.html#what-s-new-or-different
https://numpy.org/doc/stable/reference/random/generated/numpy.random.seed.html

@jhlegarreta jhlegarreta force-pushed the UseNumpyRandomGenerator branch 2 times, most recently from d77d289 to eae871f Compare March 24, 2024 17:47
Copy link
Member

@oesteban oesteban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpick following @arokem's suggestion

Use NumPy's `Generator` class as a replacement for `RandomState` for
random variarte generation methods.

`RandomState` was deprecated in NumPy 1.17.0.

Take advantage of the commit to document better the use of the `seed`
parameter.

Documentation:
https://numpy.org/doc/stable/reference/random/new-or-different.html#what-s-new-or-different
https://numpy.org/doc/stable/reference/random/generated/numpy.random.seed.html
@oesteban oesteban merged commit afc5270 into nipreps:main Mar 28, 2024
7 checks passed
@jhlegarreta jhlegarreta deleted the UseNumpyRandomGenerator branch March 28, 2024 14:03
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.

3 participants