shape#
- class saiunit.math.shape(a)#
Return the shape of an array.
- Parameters:
a (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – Input array.- Returns:
shape – The elements of the shape tuple give the lengths of the corresponding array dimensions.
- Return type:
See also
lenlen(a)is equivalent tonp.shape(a)[0]for N-D arrays withN>=1.ndarray.shapeEquivalent array method.
Examples
>>> saiunit.math.shape(saiunit.math.eye(3)) (3, 3) >>> saiunit.math.shape([[1, 3]]) (1, 2) >>> saiunit.math.shape([0]) (1,) >>> saiunit.math.shape(0) ()