Skip to content

Commit

Permalink
Invert logic for numpy.string_ compatibility version checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed May 17, 2024
1 parent 9f97523 commit aa65a8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fitsio/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def cfitsio_version(asfloat=False):
numpy.uint64, numpy.int64)

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

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

0 comments on commit aa65a8a

Please sign in to comment.