nums.numpy.size

nums.numpy.size(a)[source]

Return the number of elements along a given axis.

This docstring was copied from numpy.size.

Some inconsistencies with the NumS version may exist.

Parameters

a (BlockArray) – Input data.

Returns

element_count – Number of elements along the specified axis.

Return type

int

See also

shape

dimensions of array

Examples

The doctests shown below are copied from NumPy. They won’t show the correct result until you operate get().

>>> a = nps.array([[1,2,3],[4,5,6]])  
>>> nps.size(a)  
6