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 throughget_random_generator()will observe the new state on their next draw; this includes seeds derived for non-NumPy RNGs (e.g. sklearnrandom_statearguments or Cython Mersenne generators), which are now drawn from the global RNG rather than read from a frozen module constant.