Last modified: December 2024

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/set_rng.html
AHELP for CIAO 4.17 Sherpa

set_rng

Context: utilities

Synopsis

Set the RNG generator.

Syntax

set_rng(rng)

Description


PARAMETERS

The parameter for this function is:

Parameter Type information Definition
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` .

Changes in CIAO

Added in CIAO 4.16

This replaces the seed argument for certain routines and the need to explicitly call `numpy.random.seed` in others.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

utilities
get_rng