nlcpy.shape

nlcpy.shape(a)[source]

Returns the shape of an array.

Parameters
aarray_like

Input array.

Returns
shapetuple of ints

The elements of the shape tuple give the lengths of the corresponding array dimensions.

See also

ndarray.shape

Equivalent the array attribute.

Examples

>>> import nlcpy as vp
>>> vp.shape(vp.eye(3))
(3, 3)
>>> vp.shape([[1, 2]])
(1, 2)
>>> vp.shape([0])
(1,)
>>> vp.shape(0)
()