What does numpy.random.seed(0) do?
Asked 07 September, 2021
Viewed 1.4K times
  • 61
Votes

What does np.random.seed do in the below code from a Scikit-Learn tutorial? I'm not very familiar with NumPy's random state generator stuff, so I'd really appreciate a layman's terms explanation of this.

np.random.seed(0)
indices = np.random.permutation(len(iris_X))

11 Answer