-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
BUG: fix an incoming incompatibility with numpy 2.1 in utils.masked
#16755
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
BUG: fix an incoming incompatibility with numpy 2.1 in utils.masked
#16755
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.
|
👋 Thank you for your draft pull request! Do you know that you can use |
utils.masked
Ah, it's failing the devdeps jobs because numpy nightlies have not yet caught up with the change this is addressing. For reference, I discovered and fixed it locally by building numpy's main branch |
a796bac
to
433bbf9
Compare
Technically ready for review so I’ll undraft now, but maybe others would rather wait for numpy nightlies to catch up before this goes in. |
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.
Yes, when I reviewed the numpy code changes, I feared we had to make changes too... But this all looks good. But let's wait with merging until the nightlies have updated. Thanks!
@mhvk actually, why don't we stick to using public API (namely, https://numpy.org/doc/stable/reference/generated/numpy.get_printoptions.html) instead ? Maybe performance reasons ? If so, maybe we should wrap these into try blocks and fallback to public API for future-proofing ? |
The code was basically a copy from what was in |
I gave it a try and found something interesting: here are the options we get with the current implementation without altering defaults:
and here's what we get instead from
notice the value of |
done in #16759 |
tl;dr -- We need another commit here to fix this failure in devdeps?
|
OK nvm I just saw #16755 (comment) I will come back to this when the "nightly" updates, I guess. Thanks! |
If I'm reading the cron right, the next batch of nightlies is expected in about 6 hours, so I'll rebase this tomorrow morning and hopefully CI should go full green here. |
433bbf9
to
6d5cf78
Compare
(semi-accidental haiku) |
Incidentally, if you want to see tests failing without this patch, see example logs |
Thanks! Windows failure is indeed unrelated. |
…numpy 2.1 in `utils.masked`
…755-on-v6.1.x Backport PR #16755 on branch v6.1.x (BUG: fix an incoming incompatibility with numpy 2.1 in `utils.masked`)
Re: #16851 (comment) Fixed the milestone. |
Description
xref: numpy/numpy#26846