title: how to know the seed for a random dataset in python
body: <p>I have a simple random test code in python-3, where I generate a few random numbers, and do some processing with them, something like this:</p>
  
  <pre><code>random.seed(9001)
  while True:
      x = numpy.random.rand((10, 10))
      do_some_processing(x)
  </code></pre>
  
  <p>My problem is that when I fix the seed, ie it becomes a deterministic run, then the code works fine. But when I delete the seed line, then sometimes the code reports errors. So I need to know for what seed value were the random numbers generated which created the failures.</p>
  
  <p>So, how can I know and print the seed value, so that I can replicate the failure test?</p>