diff options
author | sasha <sasha@localhost> | 2006-03-01 00:39:50 +0000 |
---|---|---|
committer | sasha <sasha@localhost> | 2006-03-01 00:39:50 +0000 |
commit | c190cfaf8d8717aa459394629c58f5e7cadb45e3 (patch) | |
tree | 91a8d6d4c9b81b0001b88e693243ab133248252d /numpy/core/ma.py | |
parent | 6627d4e993df8033d5e078f24d84cb028ba09d0c (diff) | |
download | numpy-c190cfaf8d8717aa459394629c58f5e7cadb45e3.tar.gz |
implemented ndim attribute
Diffstat (limited to 'numpy/core/ma.py')
-rw-r--r-- | numpy/core/ma.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/ma.py b/numpy/core/ma.py index b0a9bd5da..0d6bf503c 100644 --- a/numpy/core/ma.py +++ b/numpy/core/ma.py @@ -1350,6 +1350,10 @@ array(data = %(data)s, v = default_fill_value (self.raw_data()) self._fill_value = v + def _get_ndim(self): + return self._data.ndim + ndim = property(_get_ndim, doc=numeric.ndarray.ndim.__doc__) + def _get_size (self): return self._data.size size = property(fget=_get_size, doc="Number of elements in the array.") @@ -2158,7 +2162,6 @@ array.min = _m(_min) del _min array.mean = _m(average) array.nbytes = property(_m(not_implemented)) -array.ndim = _m(not_implemented) array.newbyteorder = _m(not_implemented) array.nonzero = _m(nonzero) array.prod = _m(product) |