AI engineering glossary · NumPy pandas visualization
What is random number generator?
Random number generator (also called Generator, default_rng): The NumPy object, created with np.random.default_rng, that produces pseudo-random numbers from many distributions. It uses a deterministic algorithm, so the same starting state gives the same sequence. It is the recommended modern replacement for the older global np.random functions.
Random number generator: an example
rng = np.random.default_rng(42); rng.normal(0, 1, size=3) draws three values from a standard normal distribution.
Related terms
- Random seed
- Sampling
- NumPy
- ndarray
More NumPy pandas visualization terms
Where you learn it
Random number generator is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.