create_py_random_state#
- create_py_random_state(random_state=None)[source]#
Returns a random.Random instance depending on input.
- Parameters:
- random_stateint or random number generator or None (default=None)
If int, return a random.Random instance set with seed=int. if random.Random instance, return it. if None or the
random
package, return the global random number generator used byrandom
. if np.random package, return the global numpy random number generator wrapped in a PythonRandomInterface class. if np.random.RandomState or np.random.Generator instance, return it wrapped in PythonRandomInterface if a PythonRandomInterface instance, return it