set_random_seed#

set_random_seed(seed: int = _DEFAULT_SEED) None[source]#

Set the random seed for reproducibility.

Rebuilds the global NumPy Generator. All modules that read the RNG through get_random_generator() will observe the new state on their next draw; this includes seeds derived for non-NumPy RNGs (e.g. sklearn random_state arguments or Cython Mersenne generators), which are now drawn from the global RNG rather than read from a frozen module constant.

Parameters:

seed (int, optional) – Seed value to set, by default 180319.

Return type:

None