Permutes the axes of an array.
Arguments
- x
(
arrayish)
One input. Can be any data type. An R value materializes at its default data type.- permutation
(
integer())
Specifies the new ordering of axes. Must be a permutation ofseq_len(naxes(x)), the axis indices ofx. Negative values count from the end, i.e.-1refers to the last axis.
Value
(arrayish)
Has the input's data type and shape shape(x)[permutation].
StableHLO
Lowers to hlo_transpose(), specified under
transpose.