dpctl.tensor.permute_dims

dpctl.tensor.permute_dims(x, axes)[source]

Permute the axes (dimensions) of an array; returns the permuted array as a view.

Parameters:
  • x (usm_ndarray) – input array.

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

Returns:

An array with permuted axes. The returned array must has the same data type as x, is created on the same device as x and has the same USM allocation type as x.

Return type:

usm_ndarray