mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #17672 from bernt-matthias/topic/npz-sniff
[23.2] Npz sniffing: do not read the whole file
This commit is contained in:
@@ -4331,9 +4331,7 @@ class Npz(CompressedArchive):
|
||||
try:
|
||||
npz = np.load(filename)
|
||||
if isinstance(npz, np.lib.npyio.NpzFile):
|
||||
for f in npz.files:
|
||||
if isinstance(npz[f], np.ndarray):
|
||||
return True
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user