From aa65a8ad651d11d288e71777b59d7b508b00e7d7 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Fri, 17 May 2024 09:43:27 -0700 Subject: [PATCH] Invert logic for numpy.string_ compatibility version checks. --- fitsio/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fitsio/util.py b/fitsio/util.py index 24b5b403..5114d8d5 100644 --- a/fitsio/util.py +++ b/fitsio/util.py @@ -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)