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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NumPy generators instead of global state #14

Open
tupui opened this issue Mar 1, 2023 · 0 comments
Open

Use NumPy generators instead of global state #14

tupui opened this issue Mar 1, 2023 · 0 comments

Comments

@tupui
Copy link

tupui commented Mar 1, 2023

Hi, great library 馃憦

I have a suggestion for the seeding part. In NEP19, we recommend now to move away from the global state np.random.seed. Instead, the canonical way of using RNG is to use a generator with: rng = np.random.default_rng(seed_value). (Would be ok since you require a recent version of NumPy.)

This is especially important since in SciPy for e.g. we are not relying anymore on the global state but ask people to use the parameter random_state (sometimes called seed or rng depending on the function, sorry about the inconsistency, we are trying to resolve that slowly...).

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

No branches or pull requests

1 participant