-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix numpy 1.25 deprecation warnings. #14510
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convolution
changes look fine.
While I was at it I updated this to hopefully fix all the numpy 1.25 deprecation warnings |
Also, I think you missed one -- https://github.com/astropy/astropy/actions/runs/4376653449/jobs/7659080296 |
It looks like that's coming from |
In that case, please ignore that warning locally for this failure. Thanks!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I put an inline note that we did it a bit differently in #14484, so maybe we should keep it the same. But really it doesn't matter; could even change the construct there to be the same as you have it here.
👍 to keep things consistent with #14484 |
👍 I went with the option of filtering the warnings, as it leads to a much clearer test function body. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me!
@@ -634,10 +634,12 @@ def test_all(self): | |||
with pytest.raises(TypeError): | |||
np.all(self.q) | |||
|
|||
@pytest.mark.filterwarnings("ignore:`sometrue` is deprecated as of NumPy 1.25.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like removing NUMPY_LT_1_25
. Makes it hard to grep and remove dead code when we eventually bump minversion to numpy 1.25. Can we at least leave # NUMPY_LT_1_25
here for future grep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless numpy dev remove it first before that happens but I can't tell the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modeling changes look fine to me
@dstansby - thanks! let's get this in. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Fix numpy 1.25 deprecation warnings. (cherry picked from commit 64f58ae)
Fix numpy 1.25 deprecation warnings. (cherry picked from commit 64f58ae)
Backport PR #14510 on branch v5.2.x (Fix numpy 1.25 deprecation warnings.)
Backport PR #14510 on branch v5.0.x (Fix numpy 1.25 deprecation warnings.)
In numpy 1.25 several functions will be deprecated. I've either replaced the functions with like-for-like functions that aren't deprecated, or filtered the warnings in tests that should stay.
Fixes #14509.