Use NumPy generators instead of global state
Opened this issue ยท 0 comments
tupui commented
Hi, great library ๐
I have a suggestion for the seeding part. In NEP19, we recommend now to move away from the global state np.random.seed
. Instead, the canonical way of using RNG is to use a generator with: rng = np.random.default_rng(seed_value)
. (Would be ok since you require a recent version of NumPy.)
This is especially important since in SciPy for e.g. we are not relying anymore on the global state but ask people to use the parameter random_state
(sometimes called seed
or rng
depending on the function, sorry about the inconsistency, we are trying to resolve that slowly...).