Repository navigation
Fix compatibility issue with Table masked init and numpy 1.21 - #11364
Merged
Merged
Conversation
pllim
approved these changes
Mar 3, 2021
pllim
left a comment
Member
There was a problem hiding this comment.
Numpy-dev job finally passed. Thanks! 🎉
mhvk
approved these changes
Mar 3, 2021
mhvk
left a comment
Contributor
There was a problem hiding this comment.
Yes, very good and minimal fix. Thanks!
astrofrog
pushed a commit
that referenced
this pull request
Mar 16, 2021
Fix compatibility issue with Table masked init and numpy 1.21
eteq
pushed a commit
that referenced
this pull request
Mar 25, 2021
Fix compatibility issue with Table masked init and numpy 1.21
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.
Description
See #11291 and numpy/numpy#18425 for the full story, but in short numpy 1.21 is introducing a new FutureWarning that was causing tests to fail, but without impact to normal usage. This is due to pytest turning warnings into errors, which numpy was catching and causing the array dtype to become
object.This code specifies that the new
FutureWarningis always issued as a warning, which overrides (for this warning) the generic pytest directive to convert warnings to errors. In local testing at least this does the right thing.This patch is a band-aid for now to get tests passing again. It would be good to get this out in a bug-fix release before numpy 1.21 is released.
Fixes #11291