spacetelescope / stcal

https://stcal.readthedocs.io/en/latest/
Other
10 stars 32 forks source link

JP-3664: Numpy 2.0 incompatibility with existing use of newbyteorder #282

Closed tapastro closed 1 month ago

tapastro commented 2 months ago

Resolves JP-3664

Partially closes jwst/#8580

This PR addresses a change in behavior for numpy 2.0:

arr.newbyteorder('S').byteswap(inplace=True) >>> AttributeError: newbyteorder was removed from the ndarray class in NumPy 2.0. Use arr.view(arr.dtype.newbyteorder(order))' instead.

This PR implements the dtype method.

Checklist

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.38%. Comparing base (bd72ed5) to head (e4ff461). Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/stcal/ramp_fitting/ols_fit.py 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #282 +/- ## ======================================= Coverage 84.38% 84.38% ======================================= Files 41 41 Lines 7557 7557 ======================================= Hits 6377 6377 Misses 1180 1180 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.