I have made a significant revision. In this version, downstream projects like scikit-learn should experience significantly less forced churn.

https://github.com/rkern/numpy/blob/nep/rng-clarification/doc/neps/nep-0019-rng-policy.rst

https://mail.python.org/pipermail/numpy-discussion/2018-June/078252.html

tl;dr RandomState lives! But its distributions are forever frozen. So maybe "undead" is more apt. Anyways, RandomState will continue to provide the same stream-compatibility that it always has. But it will be internally refactored to use the same core uniform PRNG objects that the new RandomGenerator distributions class will use underneath (defaulting to the current Mersenne Twister, of course). The distribution methods on RandomGenerator will be allowed to evolve with numpy versions and get better/faster implementations.

Your code can mix the usage of RandomState and RandomGenerator as needed, but they can be made to share the same underlying RNG algorithm's state.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to