bundles / scipy latest / scipy / _lib / _util / check_random_state
function
scipy._lib._util:check_random_state
source: build-install/usr/lib/python3.14/site-packages/scipy/_lib/_util.py:334
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