diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-12-11 13:58:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 13:58:10 +0200 |
commit | 5856c486ac5dd62a6ac9b2a861aa86802e6e0edd (patch) | |
tree | dfe7c0385533c4c1d9209402a689476edfff9be2 /doc/release | |
parent | c01014507c6f128394ba1a66f91ef32fc94bbeba (diff) | |
parent | a483acce85e6a35a5da0f46aeddd05b33f6d612c (diff) | |
download | numpy-5856c486ac5dd62a6ac9b2a861aa86802e6e0edd.tar.gz |
Merge pull request #14981 from seberg/issue-13103
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/release')
-rw-r--r-- | doc/release/upcoming_changes/14981.compatibility.rst | 10 |
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. |