Unverified Commit ed69e0f8 authored by Matthias Bernt's avatar Matthias Bernt Committed by mvdbeek
Browse files

Npz sniffing: do not read the whole file

takes to much memory
parent d4836758
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -4137,8 +4137,6 @@ 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
        except Exception:
            return False