summaryrefslogtreecommitdiff
path: root/numpy/ma/mrecords.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/ma/mrecords.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/ma/mrecords.py')
-rw-r--r--numpy/ma/mrecords.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/ma/mrecords.py b/numpy/ma/mrecords.py
index 4ff7866ab..a154cbbc8 100644
--- a/numpy/ma/mrecords.py
+++ b/numpy/ma/mrecords.py
@@ -17,7 +17,6 @@ import sys
import warnings
import numpy as np
-from numpy.compat import basestring
from numpy import (
bool_, dtype, ndarray, recarray, array as narray
)
@@ -303,7 +302,7 @@ class MaskedRecords(MaskedArray):
_mask = ndarray.__getattribute__(self, '_mask')
_data = ndarray.view(self, _localdict['_baseclass'])
# We want a field
- if isinstance(indx, basestring):
+ if isinstance(indx, str):
# Make sure _sharedmask is True to propagate back to _fieldmask
# Don't use _set_mask, there are some copies being made that
# break propagation Don't force the mask to nomask, that wreaks
@@ -330,7 +329,7 @@ class MaskedRecords(MaskedArray):
"""
MaskedArray.__setitem__(self, indx, value)
- if isinstance(indx, basestring):
+ if isinstance(indx, str):
self._mask[indx] = ma.getmaskarray(value)
def __str__(self):