summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorPat Gunn <pgunn01@gmail.com>2018-06-03 00:45:50 -0400
committerPat Gunn <pgunn01@gmail.com>2018-06-03 00:45:50 -0400
commit75b7d2234d58aa590ae0b3bdd432836d55b0550c (patch)
tree970c1cadb6c236a54fbf08cefdf0ac934f055353 /numpy
parentd4e9503358ea48bb9b558503cb372346ab386167 (diff)
downloadnumpy-75b7d2234d58aa590ae0b3bdd432836d55b0550c.tar.gz
Responding to peer review, change to intp
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/memmap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index 315825b9f..3bd22dc9f 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -236,11 +236,11 @@ class memmap(ndarray):
raise ValueError("Size of available data is not a "
"multiple of the data-type size.")
size = bytes // _dbytes
- shape = (np.uint64(size),)
+ shape = (np.intp(size),)
else:
if not isinstance(shape, tuple):
shape = (shape,)
- shape = tuple(map(lambda x: np.uint64(x), shape)) # Force-promote to uint64, prevent possible overflow
+ shape = tuple(map(lambda x: np.intp(x), shape)) # Force-promote to intp, prevent possible overflow with 32-bit types near the top of their range
size = 1
for k in shape:
size *= k