shape#

named_arrays.shape(a)#

Compute the shape of the given array.

In numpy, the shape of an array is a tuple of integers. For this package, each axis is characterized by a name instead of its position, so the shape is a dict where the keys are the axis names and the values are number of elements along each axis.

Parameters:

a (int | float | complex | ndarray | Quantity | AbstractArray) – The array to compute the shape of.

Return type:

dict[str, int]