mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-27 11:27:08 +08:00
Merge pull request #194 from jehturner/pyfits_hdusize_fix
Allow for type of hdu.size changing in PyFITS 3.1
This commit is contained in:
@@ -95,7 +95,11 @@ 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:
|
||||
try:
|
||||
data_size = hdu.size()
|
||||
except TypeError: # (size changed to int in PyFITS 3.1)
|
||||
data_size = hdu.size
|
||||
if data_size > 0:
|
||||
ext_list.append((filename, n))
|
||||
hdulist.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user