You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
numpy 2 compat: tests failing with default print options #16423
90% of the solution is already isolated in #16416, and we can probably extract backportable solutions for the other 10% from #15065.
I'm seeing ~400 failures (doctests included) on main, 90% of which are resolved by #16416, but not all of what's left are doctests, which, as discussed in #15095, are not critical and can be post-poned to after numpy 2.0.0 final comes out (supposedly this would be for astropy 7.0.0)
Everything that's not a doctest, and not already fixed in #16416, should probably be addressed for 6.1.1
note for later: I think one of the failures we got in utils is showing an discrepency between how masked arrays are represented (repr) with respect to ordinary arrays in numpy 2.0. This may be something to report upstream but I need to dig further.
Actually what I'm finding out thusfar is that the failures I'm pointing to in this issue are not resolved by #15065, and require their own solution. Since they are related but separable problems, I don't think we need to discuss this here.
@neutrinoceros - in rebasing #15065, I found test failures with pandas which are not representation-related. Are those among those you are thinking of? Also, if bottleneck is installed, some representations from sigma clipping look different...
re #16423 (comment):
I'm now thinking the bug is actually on our side, specifically in MaskedFormat.__call__, but I don't have time to fix it just now. VOTable failures are also a puzzle and are possibly related, so I think utils.masked should be the next priority. I'll come back to it later today if time allows.
Upon a closer look at #15065, it seems that it already has solutions for both utils (d84166e) and votable (940e5e7).
Unless we changed our minds about waiting for numpy 2.0 final to merge #15065, I think these ought to be cherry-picked and backported. What do you think @mhvk ?
I actually wondered about whether we shouldn't just merge #15065 for main, and then backport the commits that do not have to do with the documentation (i.e., docs for 6.1 stay at numpy < 2.0 format). Though perhaps effectively that is the same amount of work...
I think it's very much a comparable effort and not a big undertaking for us two, but the cherry-picking approach should make reviewing easier. If you agree to it, it shouldn't take me long to finish cherry picking the user-facing parts (only two more PRs).
I don't expect it to get in the way of anyone so it should be very low priority, but I do have a personal reminder to clean it up when the time comes.
That said, your phrasing seems to imply that not having an issue isn't an option, so let me open one now :)
Activity
[-]numpy 2 compat: [/-][+]numpy 2 compat: tests failing with default print options[/+]neutrinoceros commentedon May 9, 2024
note for later: I think one of the failures we got in
utilsis showing an discrepency between how masked arrays are represented (repr) with respect to ordinary arrays in numpy 2.0. This may be something to report upstream but I need to dig further.mhvk commentedon May 9, 2024
Maybe an idea is to merge #15065 for main, and then backport pieces of that? In any case, it seems sensible for me to rebase that...
neutrinoceros commentedon May 9, 2024
Actually what I'm finding out thusfar is that the failures I'm pointing to in this issue are not resolved by #15065, and require their own solution. Since they are related but separable problems, I don't think we need to discuss this here.
pllim commentedon May 9, 2024
mhvk commentedon May 9, 2024
@neutrinoceros - in rebasing #15065, I found test failures with pandas which are not representation-related. Are those among those you are thinking of? Also, if
bottleneckis installed, some representations from sigma clipping look different...pllim commentedon May 9, 2024
Re: #16423 (comment)
Nevermind, I just saw #15095 (comment)
neutrinoceros commentedon May 10, 2024
re #16423 (comment):
I'm now thinking the bug is actually on our side, specifically in
MaskedFormat.__call__, but I don't have time to fix it just now. VOTable failures are also a puzzle and are possibly related, so I thinkutils.maskedshould be the next priority. I'll come back to it later today if time allows.neutrinoceros commentedon May 12, 2024
Upon a closer look at #15065, it seems that it already has solutions for both
utils(d84166e) andvotable(940e5e7).Unless we changed our minds about waiting for numpy 2.0 final to merge #15065, I think these ought to be cherry-picked and backported. What do you think @mhvk ?
mhvk commentedon May 12, 2024
I actually wondered about whether we shouldn't just merge #15065 for main, and then backport the commits that do not have to do with the documentation (i.e., docs for 6.1 stay at numpy < 2.0 format). Though perhaps effectively that is the same amount of work...
neutrinoceros commentedon May 12, 2024
I think it's very much a comparable effort and not a big undertaking for us two, but the cherry-picking approach should make reviewing easier. If you agree to it, it shouldn't take me long to finish cherry picking the user-facing parts (only two more PRs).
mhvk commentedon May 12, 2024
OK, let's go that route - then #15065 will probably get in when numpy 2.0 is out (just saw rc2 was released).
neutrinoceros commentedon May 13, 2024
Done with #16442 and #16443
neutrinoceros commentedon May 22, 2024
numpy 2.0 has a release date: numpy/numpy#24300 (comment)
I'd recommend merging the remaining PRs related to this issue and cutting a 6.1.1 release before june 16th
FYI @astrofrog @saimn @mhvk @pllim
pllim commentedon May 22, 2024
So is it just #16427 and #16433 left?
neutrinoceros commentedon May 23, 2024
Yes !
pllim commentedon May 23, 2024
When they are all in, do we need a follow-up issue to get rid of
without_legacy_printoptionsin the future? Or do we already have such issue?neutrinoceros commentedon May 23, 2024
I don't expect it to get in the way of anyone so it should be very low priority, but I do have a personal reminder to clean it up when the time comes.
That said, your phrasing seems to imply that not having an issue isn't an option, so let me open one now :)
update: #16491
pllim commentedon May 23, 2024
Well, I can't arrest you or anything... 😸 Thanks for opening the issue! It is good to have it out in the open to show people we're aware of it.
neutrinoceros commentedon May 23, 2024
Let's call it making me an offer I can't refuse 🤌🏻
neutrinoceros commentedon May 24, 2024
Alright, everything was merged, let's close this ! thanks !