diff options
author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2020-05-07 09:06:05 +0100 |
---|---|---|
committer | Kevin Sheppard <kevin.sheppard@gmail.com> | 2020-05-12 22:39:47 +0100 |
commit | 95309c74204c6cdedb7d9498eb95f155941cd948 (patch) | |
tree | 47b70082f3355cd1cfbb5d43b808a950235ce018 | |
parent | f7d740c99f31ed2ec826ef7d459b016a556aa178 (diff) | |
download | numpy-95309c74204c6cdedb7d9498eb95f155941cd948.tar.gz |
DOC: Improve the docstring for MT19937.jumped
Clarify the method used and the source of the code
-rw-r--r-- | numpy/random/_mt19937.pyx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/numpy/random/_mt19937.pyx b/numpy/random/_mt19937.pyx index 919a96a4c..b89a61ea1 100644 --- a/numpy/random/_mt19937.pyx +++ b/numpy/random/_mt19937.pyx @@ -226,6 +226,24 @@ cdef class MT19937(BitGenerator): ------- bit_generator : MT19937 New instance of generator jumped iter times + + Notes + ----- + The jump step is computed using a modified version of Matsumoto's + implementation of Horner's method. The step polynomial is precomputed + to perform 2**128 steps. The jumped state has been verified to match + the state produced using Matsumoto's original code. + + References + ---------- + .. [1] Matsumoto, M, Generating multiple disjoint streams of + pseudorandom number sequences. Accessed on: May 6, 2020. + [Online]. Available: + http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/JUMP/ + .. [2] Hiroshi Haramoto, Makoto Matsumoto, Takuji Nishimura, François + Panneton, Pierre L\'Ecuyer, "Efficient Jump Ahead for F2-Linear + Random Number Generators", INFORMS JOURNAL ON COMPUTING, Vol. 20, + No. 3, Summer 2008, pp. 385-390. """ cdef MT19937 bit_generator |