diff --git a/fitsio/fitslib.py b/fitsio/fitslib.py index 01ae48b..5e6dc88 100644 --- a/fitsio/fitslib.py +++ b/fitsio/fitslib.py @@ -1874,7 +1874,7 @@ def get_dither_seed(dither_seed): seed_out = 0 else: # must fit in an int - seed_out = numpy.int32(dither_seed).clip(min=-1) + seed_out = numpy.int32(dither_seed) if seed_out > 10_000: raise ValueError( diff --git a/fitsio/tests/test_image_compression.py b/fitsio/tests/test_image_compression.py index 26aef3d..b355c53 100644 --- a/fitsio/tests/test_image_compression.py +++ b/fitsio/tests/test_image_compression.py @@ -266,7 +266,8 @@ def test_compressed_seed(compress, seed_type, use_fits_object, dtype): dither_seed2 = 'checksum' elif seed_type == 'checksum_int': dither_seed1 = -1 - dither_seed2 = -1 + # any negative means use checksum + dither_seed2 = -3 with tempfile.TemporaryDirectory() as tmpdir: fname1 = os.path.join(tmpdir, 'test1.fits')