diff options
| author | drasmuss <daniel.rasmussen@appliedbrainresearch.com> | 2016-05-02 17:06:26 -0400 |
|---|---|---|
| committer | drasmuss <daniel.rasmussen@appliedbrainresearch.com> | 2016-05-09 09:45:42 -0400 |
| commit | da668fc74653e5caae9f741461c4d20f9df6e5c1 (patch) | |
| tree | b0a29e85a6521e0126b13c86762b64ad8f8ae2e5 /numpy/lib/format.py | |
| parent | 1fc180b4c683e79649e5699303722995ca3e8ef9 (diff) | |
| download | numpy-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.py | 2 |
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: |
