You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: