mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-05 09:24:40 +08:00
Allow for type of hdu.size changing in PyFITS 3.1
This commit is contained in:
@@ -95,8 +95,12 @@ def imread_collection(load_pattern, conserve_memory=True):
|
||||
isinstance(hdu, pyfits.PrimaryHDU):
|
||||
# Ignore (primary) header units with no data (use '.size'
|
||||
# rather than '.data' to avoid actually loading the image):
|
||||
if hdu.size() > 0:
|
||||
ext_list.append((filename, n))
|
||||
try:
|
||||
if hdu.size() > 0:
|
||||
ext_list.append((filename, n))
|
||||
except TypeError: # (size changed to int in PyFITS 3.1)
|
||||
if hdu.size > 0:
|
||||
ext_list.append((filename, n))
|
||||
hdulist.close()
|
||||
|
||||
return io.ImageCollection(ext_list, load_func=FITSFactory,
|
||||
|
||||
Reference in New Issue
Block a user