MAINT: Correct code producing warnings#18432
Merged
mattip merged 2 commits intonumpy:masterfrom Feb 18, 2021
Merged
Conversation
Contributor
Author
|
These produce warnings when building using clang-cl on Windows. Two are just casts. The other appears to be the wrong function for the input (labs -> llabs). |
Contributor
Author
|
Failure is due to coverage, not being wrong. |
mattip
reviewed
Feb 17, 2021
numpy/core/src/multiarray/ctors.c
Outdated
Member
There was a problem hiding this comment.
This is strange: shouldn't you need to cast both NPY_MIN_INTP and NPY_MAX_INTP?
Contributor
Author
|
It doesn't complain about NPY_MIN_INTP, just NPY_MAX_INTP. Could the double representation of NPY_MIN_INTP is exact? |
Cast to avoid warnings Correct function
5cf2bad to
e2467e4
Compare
Member
|
I think even if it does not currently emit a warning it would be better to pre-emptively add a cast to |
Contributor
Author
|
Easy enough to add. |
Contributor
Author
|
@mattip all green except coverage delta which is unavoidable. |
Member
|
Thanks @bashtage |
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
May 4, 2021
Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Jun 2, 2021
Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Jun 8, 2021
Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Jul 1, 2021
Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Sep 2, 2021
Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Nov 4, 2021
Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Nov 9, 2021
Add optimization Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Nov 9, 2021
Add optimization Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Nov 11, 2021
Add optimization Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Nov 19, 2021
Add optimization Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Nov 30, 2021
Add optimization Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
bashtage
added a commit
to bashtage/numpy
that referenced
this pull request
Jan 20, 2022
Add optimization Revert changes for warnings awaiting numpy#18432 Small clean up of commented code
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.
Cast to avoid warnings
Correct function