cunumeric.moveaxis#

cunumeric.moveaxis(a: ndarray, source: Sequence[int], destination: Sequence[int]) ndarray#

Move axes of an array to new positions. Other axes remain in their original order.

Parameters:
  • a (ndarray) – The array whose axes should be reordered.

  • source (int or Sequence[int]) – Original positions of the axes to move. These must be unique.

  • destination (int or Sequence[int]) – Destination positions for each of the original axes. These must also be unique.

Returns:

result – Array with moved axes. This array is a view of the input array.

Return type:

ndarray

See also

numpy.moveaxis

Availability:

Multiple GPUs, Multiple CPUs