create_random_state#

create_random_state(random_state=None)[source]#

Returns a numpy.random.RandomState or numpy.random.Generator instance depending on input.

Parameters:
random_stateint or NumPy RandomState or Generator instance, optional (default=None)

If int, return a numpy.random.RandomState instance set with seed=int. if numpy.random.RandomState instance, return it. if numpy.random.Generator instance, return it. if None or numpy.random, return the global random number generator used by numpy.random.