shape

ivy.shape(x, as_array=False, f=None)[source]

Returns the shape of the array x.

Parameters
  • x (array) – Input array to infer the shape of.

  • as_array (bool, optional) – Whether to return the shape as a array, default False.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

Shape of the array


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty