From 3e937f9df65c26da666a72e38b7568f1ef6a763e Mon Sep 17 00:00:00 2001 From: Erin Sheldon Date: Tue, 20 Aug 2024 14:08:46 -0400 Subject: [PATCH] remove clip --- fitsio/fitslib.py | 2 +- fitsio/tests/test_image_compression.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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')