summaryrefslogtreecommitdiff
path: root/numpy/lib/format.py
diff options
context:
space:
mode:
authordrasmuss <daniel.rasmussen@appliedbrainresearch.com>2016-05-02 17:06:26 -0400
committerdrasmuss <daniel.rasmussen@appliedbrainresearch.com>2016-05-09 09:45:42 -0400
commitda668fc74653e5caae9f741461c4d20f9df6e5c1 (patch)
treeb0a29e85a6521e0126b13c86762b64ad8f8ae2e5 /numpy/lib/format.py
parent1fc180b4c683e79649e5699303722995ca3e8ef9 (diff)
downloadnumpy-da668fc74653e5caae9f741461c4d20f9df6e5c1.tar.gz
BUG: Cast size to int64 when loading from archive
Prevents overflow errors for large arrays on systems where the default int type is int32.
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r--numpy/lib/format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py
index a0f2c5497..cfe0e62ac 100644
--- a/numpy/lib/format.py
+++ b/numpy/lib/format.py
@@ -623,7 +623,7 @@ def read_array(fp, allow_pickle=True, pickle_kwargs=None):
if len(shape) == 0:
count = 1
else:
- count = numpy.multiply.reduce(shape)
+ count = numpy.multiply.reduce(shape, dtype=numpy.int64)
# Now read the actual data.
if dtype.hasobject: