pyrtid.utils.check_random_state#
- pyrtid.utils.check_random_state(seed)[source]#
Turn seed into a np.random.RandomState instance.
- Parameters
seed ({None, int, numpy.random.Generator, numpy.random.RandomState}, optional) – If seed is None (or np.random), the numpy.random.RandomState singleton is used. If seed is an int, a new
RandomStateinstance is used, seeded with seed. If seed is already aGeneratororRandomStateinstance then that instance is used.- Returns
seed – Random number generator.
- Return type
{numpy.random.Generator, numpy.random.RandomState}