bundles / scipy latest / scipy / _lib / _util / check_random_state
function
scipy._lib._util:check_random_state
source: /scipy/_lib/_util.py :393
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.cluster.vq.check_random_state