[Numpy-discussion] overhauling numpy.random and randomgen Message-ID:
shoyer at gmail.com
Fri Apr 19 13:23:31 EDT 2019
On Fri, Apr 19, 2019 at 4:54 AM Kevin Sheppard <kevin.k.sheppard at gmail.com>
> > Finally, why do we expose the np.random.gen object? I thought part of the
> idea with the new API was to avoid global mutable state.
> Module level functions are essential for quick experiments and should be
> provided. The only difference here is that the singleton `seed` and
> `state` are no longer exposed so that it isn't possible (using the exposed
> API) to set the seed.
It seems like you could set the seed with np.random.gen.brng.seed() ?
I do agree that module level functions are convenient and should be
preserved (without the ability to seed them), but it seems like that would
be an argument for exposing aliases to RandomGenerator methods (like what
we currently do for RandomState methods), rather the exposing the full
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion