This is documentation for an old release of NumPy (version 1.3.). Read this page in the documentation of the latest stable release (version > 1.17).
Return the number of elements along a given axis.
Parameters: | a : array_like
axis : int, optional
|
---|---|
Returns: | element_count : int
|
See also
Examples
>>> a = np.array([[1,2,3],[4,5,6]])
>>> np.size(a)
6
>>> np.size(a,1)
3
>>> np.size(a,0)
2