summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2019-02-22 12:55:50 -0700
committerGitHub <noreply@github.com>2019-02-22 12:55:50 -0700
commit1bf2b9434b74a27019a04622dd5bc3790102e7d6 (patch)
tree9c27ffa51141aa4994e65bdb14475243dc0ce1b6 /doc
parent04b422017008bb24713475b85c072395dce89059 (diff)
parent56bf38b018160471dfe88cb6f2a6dc0a5e93c087 (diff)
downloadnumpy-1bf2b9434b74a27019a04622dd5bc3790102e7d6.tar.gz
Merge pull request #12846 from tlatorre-uchicago/divmod-bugfix
BUG: fix signed zero behavior in npy_divmod
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.17.0-notes.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/release/1.17.0-notes.rst b/doc/release/1.17.0-notes.rst
index d3a7779c8..57f7505ff 100644
--- a/doc/release/1.17.0-notes.rst
+++ b/doc/release/1.17.0-notes.rst
@@ -36,7 +36,21 @@ Casting from a different floating point precision to float16 used incorrect
rounding in some edge cases. This means in rare cases, subnormal results will
now be rounded up instead of down, changing the last bit (ULP) of the result.
+Signed zero when using divmod
+-----------------------------
+Starting in version 1.12.0, numpy incorrectly returned a negatively signed zero
+when using the ``divmod`` and ``floor_divide`` functions when the result was
+zero. For example::
+
+ >>> np.zeros(10)//1
+ array([-0., -0., -0., -0., -0., -0., -0., -0., -0., -0.])
+
+With this release, the result is correctly returned as a positively signed
+zero::
+
+ >>> np.zeros(10)//1
+ array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
C API changes
=============