permute_dims

permute_dims(x: array, /, axes: Tuple[int, ...]) array

Permutes the axes (dimensions) of an array x.

Parameters
  • x (array) – input array.

  • axes (Tuple[int, ...]) – tuple containing a permutation of (0, 1, ..., N-1) where N is the number of axes (dimensions) of x.

Returns

out (array) – an array containing the axes permutation. The returned array must have the same data type as x.