This PR converts all legacy calls np.random.seed(seed=) into np.random.default_rng(seed=).
It also removes the random_state_definition function that was essentially useless (np.random.default_rng() also accepts None, int or another np.random.Generator and returns the right result).
We stop the support for np.random.RandomState as input, which only provided access to specific legacy generator seeds, so was essentially useless for our applications here (we're already satisfied passing an integer as seed, or a specific random generator from np.random.Generator, we don't need any kind of repeatability with old-schools generators).
And renames rnd into rng everywhere for consistency.
This PR converts all legacy calls
np.random.seed(seed=)
intonp.random.default_rng(seed=)
. It also removes therandom_state_definition
function that was essentially useless (np.random.default_rng()
also accepts None, int or anothernp.random.Generator
and returns the right result).We stop the support for
np.random.RandomState
as input, which only provided access to specific legacy generator seeds, so was essentially useless for our applications here (we're already satisfied passing an integer as seed, or a specific random generator fromnp.random.Generator
, we don't need any kind of repeatability with old-schools generators). And renamesrnd
intorng
everywhere for consistency.Resolves #510