set_rng

sherpa.astro.ui.set_rng(rng)

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 calling numpy.random.seed.

See also

get_rng