summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorThouis (Ray) Jones <thouis@gmail.com>2012-07-06 23:42:57 +0200
committerThouis (Ray) Jones <thouis@gmail.com>2012-07-06 23:42:57 +0200
commitaeff403ff868e822ebebdb8e6fb02055cd6ccf5b (patch)
tree8022d135b2154b2a90366704addb99442fba1993 /numpy/lib/npyio.py
parent5b5a0f4999dfac66c9c27160737352c727a3517b (diff)
parent3b9a0fea12ae89fe6ce745d9af0beb3df17260b8 (diff)
downloadnumpy-aeff403ff868e822ebebdb8e6fb02055cd6ccf5b.tar.gz
Merge remote-tracking branch 'upstream/master' into malloc_hooks
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py3
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)