summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-05-05 21:11:39 +0100
committerEric Wieser <wieser.eric@gmail.com>2017-05-05 21:46:58 +0100
commit36e7513edd1114c3f928be66953d4349273122c0 (patch)
treec0c6d7c854a9958512315ee30f03d5de14ea268b /numpy/lib/index_tricks.py
parentb2006cb2a7fe508bca8aa7039352731634869334 (diff)
downloadnumpy-36e7513edd1114c3f928be66953d4349273122c0.tar.gz
BUG: np.ma.mr_['r',...] does not return masked arrays
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index cece2b868..dc8eb1c4a 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -15,8 +15,6 @@ from .function_base import diff
from numpy.core.multiarray import ravel_multi_index, unravel_index
from numpy.lib.stride_tricks import as_strided
-makemat = matrixlib.matrix
-
__all__ = [
'ravel_multi_index', 'unravel_index', 'mgrid', 'ogrid', 'r_', 'c_',
@@ -238,6 +236,8 @@ class AxisConcatenator(object):
"""
# allow ma.mr_ to override this
concatenate = staticmethod(_nx.concatenate)
+ makemat = staticmethod(matrixlib.matrix)
+
def __init__(self, axis=0, matrix=False, ndmin=1, trans1d=-1):
self.axis = axis
self.matrix = matrix
@@ -341,7 +341,7 @@ class AxisConcatenator(object):
if matrix:
oldndim = res.ndim
- res = makemat(res)
+ res = self.makemat(res)
if oldndim == 1 and col:
res = res.T
return res