On Fri, Apr 19, 2019 at 4:54 AM Kevin Sheppard <kevin.k.shepp...@gmail.com>
wrote:

> > 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
RandomGenerator itself.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to