ivy.transpose(x: ivy.NativeArray, axes: Optional[List[int]] = None, f: Optional[ivy.Framework] = None) → ivy.NativeArray[source]

Permutes the dimensions of an array.

  • x (array) – Input array.

  • axes (sequence of ints of length N) – By default, reverse the dimensions, otherwise permute the axes according to the values given.

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


x with its axes permuted.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty