[Numpy-discussion] Backwards-incompatible improvements to numpy.random.RandomState

Sturla Molden sturla.molden at gmail.com
Sun May 24 14:56:17 EDT 2015


On 24/05/15 20:04, Nathaniel Smith wrote:

> I'm not sure what you're envisioning as needing a deprecation cycle? The
> neat thing about random is that we already have a way for users to say
> that they want replicability -- the use of an explicit seed --

No, this is not sufficient for random numbers. Random sampling and 
ziggurat generators are examples. If we introduce a change (e.g. a 
bugfix) that will affect the number of calls to the entropy source, just 
setting the seed will in general not be enough to ensure backwards 
compatibility. That is e.g. the case with using ziggurat samplers 
instead of the current transcendental transforms for normal, exponential 
and gamma distributions. While ziggurat is faster (and to my knowledge) 
more accurate, it will also make a different number of calls to the 
entropy source, and hence the whole sequence will be affected, even if 
you do set a random seed.


Sturla




More information about the NumPy-Discussion mailing list