diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-03-22 23:10:43 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-05-05 21:36:03 +0100 |
commit | e6b8e75547af0cc4d38af458eff5e5d6c14102b8 (patch) | |
tree | ddb9dc76e81382ccce6d7f5f28c2f558b3658fa5 /numpy/lib | |
parent | 69b0c42bca27dd5d5522de306bcd7db7deccbfad (diff) | |
download | python-numpy-e6b8e75547af0cc4d38af458eff5e5d6c14102b8.tar.gz python-numpy-e6b8e75547af0cc4d38af458eff5e5d6c14102b8.tar.bz2 python-numpy-e6b8e75547af0cc4d38af458eff5e5d6c14102b8.zip |
MAINT: Remove code duplicated from np.r_ in np.ma.mr_
Also adds a test for the disabled-by-design behaviour - this would return
raw matrices, not masked arrays
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/index_tricks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 1fd530f33..58d3e0dcf 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -237,6 +237,8 @@ class AxisConcatenator(object): For detailed documentation on usage, see `r_`. """ + # allow ma.mr_ to override this + concatenate = staticmethod(_nx.concatenate) def _retval(self, res): if self.matrix: @@ -345,7 +347,7 @@ class AxisConcatenator(object): for k in scalars: objs[k] = objs[k].astype(final_dtype) - res = _nx.concatenate(tuple(objs), axis=self.axis) + res = self.concatenate(tuple(objs), axis=self.axis) return self._retval(res) def __len__(self): |