BUG: Fortify string casts against floating point warnings#22855
Merged
charris merged 1 commit intonumpy:mainfrom Dec 21, 2022
Merged
BUG: Fortify string casts against floating point warnings#22855charris merged 1 commit intonumpy:mainfrom
charris merged 1 commit intonumpy:mainfrom
Conversation
This removes the check for floating point warnings, which is enough in practice. (In principle ufuncs or structured dtypes can chain casts in a way that causes us to check anyway.) It also checks for isfinite in the scalar repr code so the warnings shouldn't be set to begin with. Closes numpygh-22843
Member
|
Thanks Sebastian. |
seberg
added a commit
to seberg/numpy
that referenced
this pull request
Dec 22, 2022
There is not much value in these values anyway probably, but tiny isn't reliably for double-double (maybe it should be, but that is a different issue). Fixup for numpygh-22855 and numpygh-22868
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 removes the check for floating point warnings, which is enough in practice. (In principle ufuncs or structured dtypes can chain casts in a way that causes us to check anyway.)
It also checks for isfinite in the scalar repr code so the warnings shouldn't be set to begin with.
Closes gh-22843
Edit removed round-tripping check. It is broken for complex longdouble and may sometimes fail for longdouble as well. And thus, I guess should be checked more explicitly and not in the same test.