wesm / pydata-book

Materials and IPython notebooks for "Python for Data Analysis" by Wes McKinney, published by O'Reilly Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

np.random.randn, np.random.randint have been replaced with a new paradigm using a generator

wrongways opened this issue · comments

See: https://numpy.org/doc/stable/reference/random/index.html#random-quick-start

Replace np.random.seed() with rng = np.random.default_rng()
Replace np.random.randint() with rng.integers()
Replace np.random.randn() with rng.standard_normal()
Replace np.random.normal() with rng.normal()

This is done in the 3rd edition