summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
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 ad0d7ad79..61b8ba3ac 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, basestring, os_fspath, contextlib_nullcontext, is_pathlib_path
+ long, os_fspath, contextlib_nullcontext, is_pathlib_path
)
from numpy.core.overrides import set_module
@@ -271,7 +271,7 @@ class memmap(ndarray):
# special case - if we were constructed with a pathlib.path,
# then filename is a path object, not a string
self.filename = filename.resolve()
- elif hasattr(fid, "name") and isinstance(fid.name, basestring):
+ elif hasattr(fid, "name") and isinstance(fid.name, str):
# py3 returns int for TemporaryFile().name
self.filename = os.path.abspath(fid.name)
# same as memmap copies (e.g. memmap + 1)