diff options
author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-04-27 17:15:13 +0100 |
---|---|---|
committer | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-04-29 19:13:06 +0100 |
commit | 52cb23824c6b1d8e573423b98ed1e4ac7b893e01 (patch) | |
tree | aa6861069b534485d89566b08bcf7e0ff46e9eb8 /doc | |
parent | 6e249b94335d2d42307867c6b1dbefd9c57ab585 (diff) | |
download | numpy-52cb23824c6b1d8e573423b98ed1e4ac7b893e01.tar.gz |
BUG: Proect generators from log(0.0)
Ensure log(0.0) doesn't produce inf/nan values when generating random values
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 ============= |