diff options
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 221529929..cb14e4963 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -359,7 +359,6 @@ def load(file, mmap_mode=None): own_fid = True elif isinstance(file, gzip.GzipFile): fid = seek_gzip_factory(file) - own_fid = True else: fid = file @@ -371,7 +370,7 @@ def load(file, mmap_mode=None): fid.seek(-N, 1) # back-up if magic.startswith(_ZIP_PREFIX): # zip-file (assume .npz) own_fid = False - return NpzFile(fid, own_fid=True) + return NpzFile(fid, own_fid=own_fid) elif magic == format.MAGIC_PREFIX: # .npy file if mmap_mode: return format.open_memmap(file, mode=mmap_mode) |