Skip to content

Commit

Permalink
Put numpy.string_ back in for numpy<2.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed May 17, 2024
1 parent 12b72eb commit a99e6bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fitsio/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def cfitsio_version(asfloat=False):
numpy.uint64, numpy.int64)

# different for py3
_stypes += (numpy.str_, )
if numpy.lib.NumpyVersion(numpy.__version__) >= "2.0.0":
_stypes += (numpy.str_,)
else:
_stypes += (numpy.string_, numpy.str_,)

# for header keywords
_ftypes = (float, numpy.float32, numpy.float64)
Expand Down

0 comments on commit a99e6bd

Please sign in to comment.