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

Mersenne Twister generator in chapter 4 #6

Open
fizban99 opened this issue Jul 7, 2023 · 0 comments
Open

Mersenne Twister generator in chapter 4 #6

fizban99 opened this issue Jul 7, 2023 · 0 comments

Comments

@fizban99
Copy link

fizban99 commented Jul 7, 2023

In chapter 4, the Mersenne Twister generator is used as a parameter of RandomState. According to the documentation, it seems that RandomState directly accepts a seed for its own Mersenne Twister generator, so it would be much simpler to just have:

rs = rn.RandomState(seed=42)

The result is not exactly the same because of the different ways the seed is considered in the two usages. The usage of RandomState shown on the book seems to be its legacy form, but probably is overcomplicating things for NumPy versions newer than 1.16.

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