We have a very simple program (single-threaded) where we we do a bunch of random sample generation. For this we are using several calls of the numpy
random functions (like normal
or random_sample
). Sometimes the result of one random call determines the number of times another random function is called.
Now I want to set a seed in the beginning s.th. multiple runs of my program should yield the same result. For this I'm using an instance of the numpy
class RandomState
. While this is the case in the beginning, at some time the results become different and this is why I'm wondering.
When I am doing everything correctly, having no concurrency and thereby a linear call of the functions AND no other random number generator involded, why does it not work?