summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2019-11-25 11:16:28 -0600
committerSebastian Berg <sebastian@sipsolutions.net>2019-11-25 17:48:44 -0600
commita483acce85e6a35a5da0f46aeddd05b33f6d612c (patch)
tree84ac644ec8e3a3767c1712a5290424366b037fc3 /doc
parent9aeb7513019954718a3225fbab24bdbb98ca4fd5 (diff)
downloadnumpy-a483acce85e6a35a5da0f46aeddd05b33f6d612c.tar.gz
BUG: Make ``ediff1d`` kwarg casting consistent
This reverts commit c088383cb290ca064d456e89d79177a0e234cb8d and uses the same kind casting rule for the additional keyword arguments ``to_end`` and ``to_begin``. This results in slightly more leniant behaviour for integers (which can now have overflows that are hidden), but fixes an issue with the handling of NaN. Generally, this behaviour seems more conistent with what NumPy does elsewhere. The Overflow issue exists similar in many other places and should be solved by integer overflow warning machinery while the actual cast takes place. Closes gh-13103
Diffstat (limited to 'doc')
-rw-r--r--doc/release/upcoming_changes/14981.compatibility.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/14981.compatibility.rst b/doc/release/upcoming_changes/14981.compatibility.rst
new file mode 100644
index 000000000..90cf866f2
--- /dev/null
+++ b/doc/release/upcoming_changes/14981.compatibility.rst
@@ -0,0 +1,10 @@
+`np.ediff1d` casting behaviour with ``to_end`` and ``to_begin``
+---------------------------------------------------------------
+
+`np.ediff1d` now uses the ``"same_kind"`` casting rule for
+its additional ``to_end`` and ``to_begin`` arguments. This
+ensures type safety except when the input array has a smaller
+integer type than ``to_begin`` or ``to_end``.
+In rare cases, the behaviour will be more strict than it was
+previously in 1.16 and 1.17. This is necessary to solve issues
+with floating point NaN.