Closed ojdf closed 2 years ago
The accepted answer to this s/o question suggests that @ojdf's kludge is the right thing to do: https://stackoverflow.com/questions/50971213/is-there-a-scope-for-numpy-random-seeds.
just noticed that @andrewpaulreeves has made a fix to this, so you now definitely get the same initial screen if you provide the same seed. But when you add_row()
to the screen you still don't get deterministic behaviour so I don't think we can close this yet...
Currently, setting
numpy.random.seed(random_seed)
in the infinite phase screens does not do anything. I have managed to get the initial screens to be deterministic by passingrandom_seed
toft_phase_screen
when computing the initial screen. However, when rows are added to the screen these are not deterministic.It seems like using
numpy.random.seed
is a bad way of trying to get deterministic behaviour from the infinite phase screens, since the fixed seed seems to only apply within the scope of the function in whichnumpy.random.seed
is used?