[Numpy-discussion] NEP: Random Number Generator Policy
shoyer at gmail.com
Sun Jun 3 22:08:34 EDT 2018
On Sun, Jun 3, 2018 at 5:39 PM Robert Kern <robert.kern at gmail.com> wrote:
> You and I both agree that this is an anti-pattern for numpy.random, but
>> certainly there is plenty of code that relies on the stability of random
>> numbers when seeds are set by np.random.seed(). Similar to the case for
>> RandomState, we would presumably need to start issuing warnings when seed()
>> is explicitly called, which begs the question of what (if anything) we
>> propose to replace seed() with.
> Well, *I* propose `AttributeError`, myself…
>> I suppose this will be your next NEP :).
> I deliberately left it out of this one as it may, depending on our
> choices, impinge upon the design of the new PRNG subsystem, which I
> declared out of scope for this NEP. I have ideas (besides the glib "Let
> them eat AttributeErrors!"), and now that I think more about it, that does
> seem like it might be in scope just like the discussion of freezing
> RandomState and StableRandom are. But I think I'd like to hold that thought
> a little bit and get a little more screaming^Wfeedback on the core proposal
> first. I'll return to this in a few days if not sooner.
For this NEP, it might be enough here to say that the current behavior of
np.random.seed() will be deprecated just like np.random.RandomState(),
since the current implementation of np.random.seed() is intimately tied to
The natural of the exact replacement (if any) can be left for future
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion