title: Different realizations with the same random seed
body: <p>I have a project with different modules. Then I have a file called Main.py which has some code that calls these modules during the run. In the file Main.py I set random seed using:</p>
  
  <pre><code>random.seed(2)
  </code></pre>
  
  <p>The output that I get from different runs is not identical even if I use the same random seed. Could you tell me why this might be happening? The various modules in my class use <code>random.uniform, random.choice, random.sample</code> functions. In one place, I also define <code>rnduniform = random.uniform</code> and use that.</p>
  
  <p>Any help about how to solve this problem (i.e., be able to replicate the result by setting random seed) and help me understand this would be greatly appreciated.</p>
  
  <p>Thank you.</p>
  
  <p><strong>EDIT: Solved. My error.</strong></p>
  
  <p>Sorry for wasting your time. I looked more carefully at the code and one of the functions that uses random number generation was called in an <strong>init</strong> method of one of the classes. The <strong>init</strong> method was accessed before the seed was set. I tried to delete the post but I could not. Hence, this edit.</p>