On Sun, Jun 3, 2018 at 5:39 PM Robert Kern <robert.k...@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 RandomState. The natural of the exact replacement (if any) can be left for future discussion.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion