vendredi 30 juillet 2021

Using numpy default_rng with Dask?

I'd like to know how I can use a numpy default random number generator with Dask.

The documentation for e.g. dask.array.random.normal has a note saying :

New code should use the normal method of a default_rng() instance instead

I assume that is because the documentation is copied from numpy. In numpy they introduced a default random number generator so that one can have rngs with different seeds (in contrast to the old global numpy.random.seed) but I can't figure out how to use one with the Dask random functions.




Aucun commentaire:

Enregistrer un commentaire