mardi 8 septembre 2015

How to use random.RandomState

I'd like my script to create the same array of numbers each time I run the script. Earlier I was using np.random.seed(). For example:

np.random.seed(1)
X = np.random.random((3,2))

I've read that instead of np.random.seed() there should be used RandomState. But I have no idea how to use it, tried some combinations but none worked.




Aucun commentaire:

Enregistrer un commentaire