diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-05-11 09:53:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-11 09:53:18 -0700 |
commit | 4a2b6a7d8e389abe06d5d7f2fbfa6ebd03b9092a (patch) | |
tree | b71bed812ecaabfcbe86c262b59628a4690fd703 /doc | |
parent | 43bac08a45e46b1dc042417cacdbfdb307f03e69 (diff) | |
parent | 52cb23824c6b1d8e573423b98ed1e4ac7b893e01 (diff) | |
download | numpy-4a2b6a7d8e389abe06d5d7f2fbfa6ebd03b9092a.tar.gz |
Merge pull request #13416 from bashtage/protect-log-random-generation
BUG: Protect generators from log(0.0)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.17.0-notes.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/release/1.17.0-notes.rst b/doc/release/1.17.0-notes.rst index 71ad17673..60614673f 100644 --- a/doc/release/1.17.0-notes.rst +++ b/doc/release/1.17.0-notes.rst @@ -83,6 +83,17 @@ The functions ``np.load``, and ``np.lib.format.read_array`` take an `allow_pickle` keyword which now defaults to ``False`` in response to `CVE-2019-6446 <https://nvd.nist.gov/vuln/detail/CVE-2019-6446>`_. +Potential changes to the random stream +-------------------------------------- +Due to bugs in the application of log to random floating point numbers, +the stream may change when sampling from ``np.random.beta``, ``np.random.binomial``, +``np.random.laplace``, ``np.random.logistic``, ``np.random.logseries`` or +``np.random.multinomial`` if a 0 is generated in the underlying MT19937 random stream. +There is a 1 in :math:`10^{53}` chance of this occurring, and so the probability that +the stream changes for any given seed is extremely small. If a 0 is encountered in the +underlying generator, then the incorrect value produced (either ``np.inf`` +or ``np.nan``) is now dropped. + C API changes ============= |