Skip to content

Commit

Permalink
numpy 2.0: np.NaN -> np.nan (#211)
Browse files Browse the repository at this point in the history
* np.NaN -> np.nan

* add change log entry
  • Loading branch information
zacharyburnett authored Sep 14, 2023
1 parent 67476d5 commit 6d949a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ saturation
Bug Fixes
---------

- Fixed failures with Numpy 2.0. [#210]
- Fixed failures with Numpy 2.0. [#210, #211]

Other
-----
Expand Down
4 changes: 2 additions & 2 deletions src/stcal/ramp_fitting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1488,9 +1488,9 @@ def compute_median_rates(ramp_data):
gdq_sect = ramp_data.groupdq[integ, :, :, :]

# Reset all saturated groups in the input data array to NaN
# data_sect[np.bitwise_and(gdq_sect, ramp_data.flags_saturated).astype(bool)] = np.NaN
# data_sect[np.bitwise_and(gdq_sect, ramp_data.flags_saturated).astype(bool)] = np.nan
invalid_flags = ramp_data.flags_saturated | ramp_data.flags_do_not_use
data_sect[np.bitwise_and(gdq_sect, invalid_flags).astype(bool)] = np.NaN
data_sect[np.bitwise_and(gdq_sect, invalid_flags).astype(bool)] = np.nan
data_sect = data_sect / group_time

if one_groups_time_adjustment is not None:
Expand Down

0 comments on commit 6d949a2

Please sign in to comment.