summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-01-23 16:50:25 -0800
committerGitHub <noreply@github.com>2020-01-23 16:50:25 -0800
commit68224f43d09393c1981bb83ee3c13a5158d2817c (patch)
tree94153dd189f924c399c2621c325fd2fd2a5e6ba6 /numpy/core/memmap.py
parent4c32890b3628434996824ae2056333b9a389f46c (diff)
parentb4e3a4227e3a9cfe28717db458e67d79e916a418 (diff)
downloadnumpy-68224f43d09393c1981bb83ee3c13a5158d2817c.tar.gz
Merge pull request #15407 from charris/replace-basestring
MAINT: Replace basestring with str.
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)