1.6.4. numpy.alen

numpy.alen(a)[source]

Return the length of the first dimension of the input array.

Parameters:

a : array_like

Input array.

Returns:

alen : int

Length of the first dimension of a.

See also

shape, size

Examples

>>> a = np.zeros((7,4,5))
>>> a.shape[0]
7
>>> np.alen(a)
7