Skip to content

Commit

Permalink
Merge pull request #206 from s-goldman/hla-1312_numpy2_scalar_promoti…
Browse files Browse the repository at this point in the history
…on_08_29_24

HLA-1312: Numpy 2.0 scalar promotion issues in STWCS
  • Loading branch information
s-goldman authored Sep 18, 2024
2 parents 5a9212e + 6f4561e commit 9b8269b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
1.7.3 (Unreleased)
------------------

- Manual scalar promotion of refpix['PSCALE'] from float32
to float64 to avoid future Numpy 2.0 issues [#206].

- Pin astropy min version to 5.0.4. [#191]

1.7.2 (2021-11-29)
Expand Down
2 changes: 1 addition & 1 deletion stwcs/distortion/mutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def readIDCtab(tabname, chip=1, date=None, direction='forward',
refpix['YREF'] = ftab[1].data.field('YREF')[row]
refpix['XSIZE'] = ftab[1].data.field('XSIZE')[row]
refpix['YSIZE'] = ftab[1].data.field('YSIZE')[row]
refpix['PSCALE'] = round(ftab[1].data.field('SCALE')[row], 8)
refpix['PSCALE'] = round(float(ftab[1].data.field('SCALE')[row]), 8)
refpix['V2REF'] = v2ref
refpix['V3REF'] = v3ref
refpix['THETA'] = theta
Expand Down

0 comments on commit 9b8269b

Please sign in to comment.