diff --git a/examples/statistics/histogram_features.py b/examples/statistics/histogram_features.py index 31f88384f24c..6599494a858d 100644 --- a/examples/statistics/histogram_features.py +++ b/examples/statistics/histogram_features.py @@ -20,12 +20,12 @@ import numpy as np import matplotlib.pyplot as plt -np.random.seed(19680801) +rng = np.random.default_rng(seed=19680801) # example data mu = 100 # mean of distribution sigma = 15 # standard deviation of distribution -x = mu + sigma * np.random.randn(437) +x = mu + sigma * rng.standard_normal(437) num_bins = 50