summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
authorPat Gunn <pgunn01@gmail.com>2018-06-03 01:35:27 -0400
committerPat Gunn <pgunn01@gmail.com>2018-06-03 01:35:27 -0400
commit309ffbc25119aab128d2b56c252ab2cef0821f45 (patch)
tree9197f314bfcff70a8baa3902bea9f35541d671d0 /numpy/core/memmap.py
parentf09949188eb7bbc8b5e33c3f9ee7c58bf7767c69 (diff)
downloadnumpy-309ffbc25119aab128d2b56c252ab2cef0821f45.tar.gz
Revise further as per peer review
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r--numpy/core/memmap.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index f5cab4476..91be84011 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -236,11 +236,10 @@ class memmap(ndarray):
raise ValueError("Size of available data is not a "
"multiple of the data-type size.")
size = bytes // _dbytes
- shape = (np.intp(size),)
else:
if not isinstance(shape, tuple):
shape = (shape,)
- size = np.intp(1) # Causes bytes below to be computed as largest integer type available to prevent overflow
+ size = np.intp(1) # Causes bytes below to be computed as the integer type the OS uses for sizes - can prevent overflow
for k in shape:
size *= k