Pseudo random gauss numbers

Hi all,

I would like to generate random numbers based on gaussian distribution (mean + standard deviation) with python:

I noticed however that random.gauss is not pseudo random.
But I would like to keep these values constant every time I run the simulation to be able to see the effect of improvements on the lay-out (ruling out potential effects from the change of values)

I could generate them once, save them to excel, and read them every next simulation run but that seems like a bit of an overkill.
Does anyone know another way of doing this?

You are supposed to use distribution properties, but unfortunately their underlying random stream reset behavior is also bit unpredictable, and anything “pulling” a new value from the property will advance the stream.

Hi Tsy,

Thanks for the reply! So what you are saying is that it’s not possible to do this without saving the values somewhere and recalling them?

Well, you can use the python random module, you just need to define the seed and do same number of calls etc.

1 Like

Ah that’s perfect I got it to work, thank you!