size#
- class brainunit.math.size(a, axis=None)#
Return the number of elements along a given axis.
- Parameters:
- Returns:
element_count – Number of elements along the specified axis.
- Return type:
See also
shapedimensions of array
Array.shapedimensions of array
Array.sizenumber of elements in array
Examples
>>> a = Quantity([[1,2,3], [4,5,6]]) >>> saiunit.math.size(a) 6 >>> saiunit.math.size(a, 1) 3 >>> saiunit.math.size(a, 0) 2