File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Script posted to demonstrate astropy error:
2+ # https://github.com/astropy/astropy/issues/15477
3+ # Fails on astropy 5.3 .. 7.2
4+
5+ from astropy .io import fits
6+
7+ file_name = 'testF.fits.fz'
8+
9+ with fits .open (file_name , 'readonly' ) as hdu_list :
10+ hdu = hdu_list [1 ]
11+ hdu .data
Original file line number Diff line number Diff line change @@ -629,9 +629,9 @@ def test_Image_FITS_IO(run_slow):
629629 # Test rice
630630 # Avoid astropy 5.3 issue reading rice-compressed file.
631631 # cf. https://github.com/astropy/astropy/issues/15477
632- # Hopefull they will fix it before 5.4 comes out.. .
632+ # Fixed in version 7.3 .
633633 import astropy
634- if astropy .__version__ >= "5.3" and astropy .__version__ < "5.4 " : continue
634+ if astropy .__version__ >= "5.3" and astropy .__version__ < "7.3 " : continue
635635 test_file = os .path .join (datadir , "test" + tchar [i ]+ ".fits.fz" )
636636 test_image = galsim .fits .read (test_file , compression = 'rice' )
637637 np .testing .assert_array_equal (ref_array .astype (types [i ]), test_image .array ,
You can’t perform that action at this time.
0 commit comments