2

Is numpy.random.RandomState using MT19937 or something else? All the document said was Mersenne Twister, and while I saw a few legacy ones uing MT19937, I never saw a straight answer.

Thank you!

bombdruid
  • 53
  • 4
  • `np.random.get_state()[0] ` and/or `np.random.RandomState()`. Note there were major changes in 1.17. – hpaulj Jan 15 '20 at 05:23
  • 1
    The current docs mention `MT19937`, not the `Twister`. – hpaulj Jan 15 '20 at 06:39
  • As pointed out, the documentation of the now legacy [`RandomState`](https://docs.scipy.org/doc/numpy/reference/random/legacy.html) does mention that it uses a MT19937 generator. In the new [`Generator`](https://docs.scipy.org/doc/numpy/reference/random/generator.html) class, you can choose between different [bit generators](https://docs.scipy.org/doc/numpy/reference/random/bit_generators/index.html). – jdehesa Jan 15 '20 at 11:26
  • I'm sorry for not being clear in my question. I meant to ask which version of MT19937 (since it seems like there's a number of versions on the original website for MT19937) was implemented. – bombdruid Jan 16 '20 at 07:39

0 Answers0