Skip to content
Advertisement

Tag: random-seed

How does NumPy seed its random number generators if no seed is provided?

For example, suppose I call numpy.random.uniform(0, 1, 10) without calling any of the seed-related functions. NumPy must be using some default seed, but I couldn’t find it in the documentation. How does NumPy seed its random numbers when no seed is specified? Answer For NumPy’s legacy numpy.random.* functions, including numpy.random.uniform, a global RandomState object initialized with no arguments is used.

Advertisement