Never use `np.random`, that leads to non-reproducible tests. `sklearn.utils` contains a function `check_random_state` that turns an integer seed into a random number generator.