transpose#
Fully qualified name: isaacsim::common::array::transpose
- Array isaacsim::common::array::transpose( )#
Permutes an array’s axes.
Axis
iof the result is axisaxes[i]of the operand, so the result has shape{a.shape()[axes[0]], a.shape()[axes[1]], ...}.axesmust be a permutation of[0, a.ndim()); negative entries count from the last axis, as elsewhere in this library. Omittingaxesreverses the axis order, so a 0-D or 1-D operand comes back unchanged. The result keeps the operand’s dtype and device, and holds a copy rather than a view of the elements.- Parameters:
a – [in] Operand.
axes – [in] Permutation of the operand’s axes, one entry per dimension, or
std::nulloptto reverse the axis order.
- Throws:
std::invalid_argument – if
axesdoes not hold exactly one entry per dimension ofa, if any entry is out of range, or if any axis is repeated.- Returns:
A new Array holding the permuted elements.