diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-07-18 00:05:07 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-08-12 13:33:36 -0700 |
commit | 64dd060447301bbececace3fe8a9436a0d2464a1 (patch) | |
tree | f0b23d154b0fce5e6135bf16b740653124f445cb /numpy/ma | |
parent | 965890dc6035f4f400f304ea5e990a88de127eb7 (diff) | |
download | numpy-64dd060447301bbececace3fe8a9436a0d2464a1.tar.gz |
MAINT: Collect together _arraymethods, and remove duplicate 'copy'
Diffstat (limited to 'numpy/ma')
-rw-r--r-- | numpy/ma/core.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 5084f5a6c..44096a25a 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -4409,8 +4409,6 @@ class MaskedArray(ndarray): return (~m).sum(axis=axis, dtype=np.intp, **kwargs) - flatten = _arraymethod('flatten') - def ravel(self, order='C'): """ Returns a 1D version of self, as a view. @@ -4456,8 +4454,6 @@ class MaskedArray(ndarray): r._mask = nomask return r - repeat = _arraymethod('repeat') - def reshape(self, *s, **kwargs): """ @@ -5744,14 +5740,15 @@ class MaskedArray(ndarray): return out[()] # Array methods - copy = _arraymethod('copy') - diagonal = _arraymethod('diagonal') - transpose = _arraymethod('transpose') - T = property(fget=lambda self: self.transpose()) - swapaxes = _arraymethod('swapaxes') clip = _arraymethod('clip', onmask=False) copy = _arraymethod('copy') + diagonal = _arraymethod('diagonal') + flatten = _arraymethod('flatten') + repeat = _arraymethod('repeat') squeeze = _arraymethod('squeeze') + swapaxes = _arraymethod('swapaxes') + T = property(fget=lambda self: self.transpose()) + transpose = _arraymethod('transpose') def tolist(self, fill_value=None): """ |