title: How to use random.RandomState
body: <p>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:</p>
  
  <pre><code>np.random.seed(1)
  X = np.random.random((3,2))
  </code></pre>
  
  <p>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. </p>