diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-01-23 14:44:36 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2020-01-23 14:56:57 -0700 |
commit | b4e3a4227e3a9cfe28717db458e67d79e916a418 (patch) | |
tree | f8e78724985f104bb6302d5a36d4e9a0799f0ca1 /numpy/core/memmap.py | |
parent | 11654979194d7d17b78cee08f4a26877acd5071b (diff) | |
download | numpy-b4e3a4227e3a9cfe28717db458e67d79e916a418.tar.gz |
MAINT: Replace basestring with str.
This replaces basestring with str except in
- tools/npy_tempita/
- numpy/compat/py3k.py
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r-- | numpy/core/memmap.py | 4 |
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) |