numpy.ma.size(obj, axis=None)
[source]
Return the number of elements along a given axis.
Parameters: |
|
---|---|
Returns: |
|
See also
shape
ndarray.shape
ndarray.size
>>> a = np.array([[1,2,3],[4,5,6]]) >>> np.size(a) 6 >>> np.size(a,1) 3 >>> np.size(a,0) 2
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.ma.size.html