Reproducibility of python pseudo-random numbers across systems and versions?

后端 未结 5 706
后悔当初
后悔当初 2020-12-20 12:08

I need to generate a controlled sequence of pseudo-random numbers, given an initial parameter. For that I\'m using the standard python random generator, seeded by this param

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-20 12:32

    Just as a heads up: in addition to the 2.3 change, python 3 gives numbers from python 2.x from randrange and probably other functions, even if the numbers from random.random are similar.

提交回复
热议问题