summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-03-26 17:50:20 +0000
committerGitHub <noreply@github.com>2020-03-26 12:50:20 -0500
commit1c58504eec43f9ba18ac835131fed496fb59772d (patch)
tree4ffc786c9cdac81887680aa999ae6dcbd4bd407d /numpy/core/memmap.py
parent5ff70eb0fd61a39207d5166479507e1b099cb707 (diff)
downloadnumpy-1c58504eec43f9ba18ac835131fed496fb59772d.tar.gz
MAINT: simplify code that assumes str/unicode and int/long are different types (#15816)
Cleanup from the dropping of python 2
Diffstat (limited to 'numpy/core/memmap.py')
-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 61b8ba3ac..ad66446c2 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -1,7 +1,7 @@
import numpy as np
from .numeric import uint8, ndarray, dtype
from numpy.compat import (
- long, os_fspath, contextlib_nullcontext, is_pathlib_path
+ os_fspath, contextlib_nullcontext, is_pathlib_path
)
from numpy.core.overrides import set_module
@@ -242,7 +242,7 @@ class memmap(ndarray):
for k in shape:
size *= k
- bytes = long(offset + size*_dbytes)
+ bytes = int(offset + size*_dbytes)
if mode in ('w+', 'r+') and flen < bytes:
fid.seek(bytes - 1, 0)