random

Utilities to Support Random State Infrastructure

quantecon.util.random.check_random_state(seed)[source]

Check the random state of a given seed.

If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a RandomState instance, return it.

Otherwise raise ValueError.