jeudi 17 octobre 2019

How to create same rnd numbers from standard cauchy distribution?

For a simulation i need an array of cauchy distributed random numbers. This can be easly done by the function

random.standard_cauchy(N) 

Now i want to generate the exact same sequence of random numbers.

I tried

seed(42)
print(random.standard_cauchy(10), random.standard_cauchy(10))

, but i does not work. I am getting different sequences.

Is it possible to generate the same sequence of random numbers from the standard cauchy distribution?




Aucun commentaire:

Enregistrer un commentaire