I know that to seed the randomness of numpy.random, and be able to reproduce it, I should us:
import numpy as np
np.random.seed(1234)
but w
np.random.RandomState() constructs a random number generator. It does not have any effect on the freestanding functions in np.random, but must be used explicitly:
>>> rng = np.random.RandomState(42)
>>> rng.randn(4)
array([ 0.49671415, -0.1382643 , 0.64768854, 1.52302986])
>>> rng2 = np.random.RandomState(42)
>>> rng2.randn(4)
array([ 0.49671415, -0.1382643 , 0.64768854, 1.52302986])