Sahaj.blogs

Day page

27 Feb 2024

Study

NumPy · Random numbers

The Generator API (default_rng), seeding for reproducibility, distributions, shuffling, and sampling without replacement.

  • Use rng = np.random.default_rng(seed); the old np.random.seed global state is legacy.
  • The same seed gives the same sequence, which makes experiments reproducible.

Read the post →