Skip to content

Commit

Permalink
Small fix for numpy>2
Browse files Browse the repository at this point in the history
  • Loading branch information
pboley committed Jan 25, 2025
1 parent 352d975 commit 0e3d165
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oifits.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@

__author__ = "Paul Boley"
__email__ = "[email protected]"
__date__ ='17 January 2025'
__version__ = '0.6.0'
__date__ ='25 January 2025'
__version__ = '0.6.1'
_mjdzero = datetime.datetime(1858, 11, 17)

matchtargetbyname = False
Expand Down Expand Up @@ -1873,7 +1873,7 @@ def open(filename, quiet=False):
# suffer from this problem, and the strings are ugly as a result. Fix it.
if type(hdu) == fits.hdu.table.BinTableHDU:
for name in data.names:
if data.dtype[name].type == np.string_:
if data.dtype[name].type == np.bytes_:
data[name] = list(map(str.rstrip, data[name]))
if hdu.name == 'OI_WAVELENGTH':
revision = header['OI_REVN']
Expand Down

0 comments on commit 0e3d165

Please sign in to comment.