0Pricing
Data Science Academy · Lesson

Random Numbers and Seeds

Reproducible synthetic data with NumPy.

Why Generate Random Data

Real datasets are not always handy. Random numbers let you build test data, simulate scenarios, and shuffle samples on demand.

The Modern Generator

Start by creating a generator with default_rng. This is the current, recommended way to make random numbers in NumPy.

rng = np.random.default_rng()

All lessons in this course

  1. Reshape and Flatten Arrays
  2. Sum, Mean, and the Axis Trick
  3. Boolean Masks for Selection
  4. Random Numbers and Seeds
← Back to Data Science Academy