aesara.tensor.moveaxis

Contents

aesara.tensor.moveaxis#

aesara.tensor.moveaxis(a: ndarray | TensorVariable, source: int | Sequence[int], destination: int | Sequence[int]) TensorVariable[source]#

Move axes of a TensorVariable to new positions.

Other axes remain in their original order.

Parameters:
  • a – The TensorVariable whose axes should be reordered.

  • source – Original positions of the axes to move. These must be unique.

  • destination – Destination positions for each of the original axes. These must also be unique.

Returns:

TensorVariable with moved axes.

Return type:

result