Reorder

This function can be used to reorder the contents of matrices and tensors.

omtools.std.reorder_axes.reorder_axes(expr: omtools.core.variable.Variable, operation: str)

The function reorders the axes of the input.

Parameters
expr: Variable

The Variable that will have its axes reordered.

operation: str

Specifies the subscripts for reordering as comma separated list of subscript labels. Ex: ‘ijk->kij’

Examples for all the possible use cases are provided below.