Lesson 11 of 60
pythonRandom Sampling and Statistics with NumPy
20 minutes
Course progress18%
Random Sampling and Statistics
NumPy’s random module (numpy.random) is a powerful tool for generating synthetic data.
Simple RNG (Generator API)
rng = np.random.default_rng(2024)
# Uniform distribution
uniform = rng.uniform(low=0.0, high=1.0, size=5)
print(, uniform)
normal = rng.normal(loc=, scale=, size=)
(, normal)