chainerx.moveaxis

chainerx.moveaxis(a, source, destination)

Move axes of an array to new positions.

Other axes remain in their original order.

Parameters
  • a (ndarray) – Input Array.

  • source (int or tuple of ints) – Original positions of the axes to move.

  • must be unique. (These) –

  • destintation (int or tuple of ints) – Destination positions for each of

  • original axes. These must also be unique. (the) –

Returns

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

Return type

ndarray

Note

  • During backpropagation, this function propagates the gradients of the output arrays to the input array a.

See also

numpy.moveaxis()