cupy.moveaxis#

cupy.moveaxis(a, source, destination)[source]#

Moves axes of an array to new positions.

Other axes remain in their original order.

Parameters:
  • a (cupy.ndarray) – Array whose axes should be reordered.

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

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

Returns:

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

Return type:

cupy.ndarray

See also

numpy.moveaxis()