summaryrefslogtreecommitdiff
path: root/numpy/ma
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/ma')
-rw-r--r--numpy/ma/core.py2
-rw-r--r--numpy/ma/mrecords.py13
2 files changed, 9 insertions, 6 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 23b60ee8c..fda5e86dc 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -32,7 +32,7 @@ import numpy.core.numerictypes as ntypes
from numpy import ndarray, amax, amin, iscomplexobj, bool_
from numpy import array as narray
from numpy.lib.function_base import angle
-from numpy.compat import getargspec, formatargspec, long
+from numpy.compat import getargspec, formatargspec, long, basestring
from numpy import expand_dims as n_expand_dims
if sys.version_info[0] >= 3:
diff --git a/numpy/ma/mrecords.py b/numpy/ma/mrecords.py
index 72df5065e..e2c014a9c 100644
--- a/numpy/ma/mrecords.py
+++ b/numpy/ma/mrecords.py
@@ -20,13 +20,17 @@ from __future__ import division, absolute_import, print_function
__author__ = "Pierre GF Gerard-Marchant"
import sys
+import warnings
import numpy as np
-from numpy import bool_, dtype, \
- ndarray, recarray, array as narray
import numpy.core.numerictypes as ntypes
-from numpy.core.records import fromarrays as recfromarrays, \
- fromrecords as recfromrecords
+from numpy.compat import basestring
+from numpy import (
+ bool_, dtype, ndarray, recarray, array as narray
+ )
+from numpy.core.records import (
+ fromarrays as recfromarrays, fromrecords as recfromrecords
+ )
_byteorderconv = np.core.records._byteorderconv
_typestr = ntypes._typestr
@@ -37,7 +41,6 @@ from numpy.ma import MAError, MaskedArray, masked, nomask, masked_array, \
_check_fill_value = ma.core._check_fill_value
-import warnings
__all__ = ['MaskedRecords', 'mrecarray',
'fromarrays', 'fromrecords', 'fromtextfile', 'addfield',