set_rng
- sherpa.astro.ui.set_rng(rng: RandomType | None) None
Set the RNG generator.
Added in version 4.16.0: This replaces the seed argument for certain routines and the need to explicitly call
numpy.random.seed
in others.- Parameters:
rng (numpy.random.Generator, numpy.random.RandomState, or None) – Determines how random numbers are created. If set to None then the routines in
numpy.random
are used, and so can be controlled by callingnumpy.random.seed
.
See also