BUG: Make ediff1d kwarg casting consistent#14981
Merged
mattip merged 1 commit intonumpy:masterfrom Dec 11, 2019
Merged
Conversation
mattip
reviewed
Nov 25, 2019
Member
|
One minor comment nit, otherwise LGTM. |
This reverts commit c088383 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 numpygh-13103
Member
|
I wonder if the change in behaviour will affect users in practice. Should we put this in with the caveat that we may need to revert it, or is there a better way to try it out? |
Member
|
Thanks @seberg |
Contributor
|
Thanks for sorting this, much appreciated. |
Member
|
Worth a backport, or can we just treat it as a bugfix? |
Member
Author
|
Hmmm, good question. It fixes an annoying bug in a sense, but it is also more strict, so not 100% foolproof backport maybe. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts commit c088383 and
uses the same kind casting rule for the additional keyword arguments
to_endandto_begin. This results in slightly more leniantbehaviour 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