bundles / scipy 1.18.0 / scipy / _lib / _util / check_random_state
function
scipy._lib._util:check_random_state
source: /scipy/_lib/_util.py:335
Signature
def check_random_state(seed)Summary
Turn seed into a np.random.RandomState instance.
Parameters
seed: {None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optionalIf
seedis None (ornp.random), the numpy.random.RandomState singleton is used. Ifseedis an int, a newRandomStateinstance is used, seeded withseed. Ifseedis already aGeneratororRandomStateinstance then that instance is used.
Returns
seed: {`numpy.random.Generator`, `numpy.random.RandomState`}Random number generator.
Aliases
scipy.interpolate._polyint.check_random_state