random¶
Utilities to Support Random State Infrastructure
-
quantecon.util.random.check_random_state(seed)[source]¶ Turn seed into a np.random.RandomState instance.
Parameters: - seedNone, int, np.random.RandomState, or np.random.Generator
If None, the np.random.RandomState singleton is returned. If seed is an int, a new
RandomStateinstance seeded with seed is returned. If seed is already a RandomState or Generator instance, then that instance is returned.
Returns: - np.random.RandomState or np.random.Generator
Random number generator.
Notes
This code was originally sourced from scikit-learn.