diff options
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r-- | numpy/core/records.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index 9e09e46b3..db4a0fbd8 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -783,13 +783,13 @@ def fromfile(fd, dtype=None, shape=None, offset=0, formats=None, itemsize = descr.itemsize - shapeprod = sb.array(shape).prod() + shapeprod = sb.array(shape).prod(dtype=nt.intp) shapesize = shapeprod * itemsize if shapesize < 0: shape = list(shape) shape[shape.index(-1)] = size / -shapesize shape = tuple(shape) - shapeprod = sb.array(shape).prod() + shapeprod = sb.array(shape).prod(dtype=nt.intp) nbytes = shapeprod * itemsize |