Compatibility with numpy 2.5#716
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #716 +/- ##
==========================================
- Coverage 90.37% 90.36% -0.02%
==========================================
Files 99 99
Lines 4582 4586 +4
==========================================
+ Hits 4141 4144 +3
- Misses 441 442 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
CI failures from but unfortunately it does block the testing of this fix here. |
braingram
left a comment
There was a problem hiding this comment.
The warning suggests making a view. Can we use that approach here?
| if NUMPY_LT_2_5: | ||
| a.dtype = _rebuild_fits_rec_dtype(a) | ||
| else: | ||
| np.ndarray._set_dtype(a, _rebuild_fits_rec_dtype(a)) |
There was a problem hiding this comment.
Let's find a way that doesn't involve a private undocumented numpy method.
There was a problem hiding this comment.
This patch is copied from astropy , see astropy/astropy#19584 . The author of that PR is a developer of both astropy and numpy, so if he cannot find a way, I doubt we can.
There was a problem hiding this comment.
This fix is consistent with how astropy addressed it:
https://github.com/astropy/astropy/pull/19584/changes
There was a problem hiding this comment.
If you want a proper investigation, I can close this PR and open a JIRA ticket instead.
There was a problem hiding this comment.
#718 fixes the incompatibility by removing the dtype setting.
|
Remaining diffs from the devdeps are as expected, for upcoming changes in photutils and numpy/scipy. |
This PR addresses deprecation warning seen in jwst devdeps, as reported by Melanie Clarke.
Tasks
docs/pageno-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see below for change types)jwstregression tests with this branch installed (stdatamodels@git+https://github.com/pllim/stdatamodels@numpydev-dtype)news fragment change types...
changes/<PR#>.feature.rst: new featurechanges/<PR#>.bugfix.rst: fixes an issuechanges/<PR#>.doc.rst: documentation changechanges/<PR#>.removal.rst: deprecation or removal of public APIchanges/<PR#>.misc.rst: infrastructure or miscellaneous change