vortex_torch.indexer.transpose

Classes

Transpose()

Swap the two inner axes of each slice along the leading axis.

class Transpose[source]

Bases: vOp

Swap the two inner axes of each slice along the leading axis.

Math:
\[Y_{s,d_1,d_0} = X_{s,d_0,d_1},\]

applied independently per leading index \(s\).

__init__:

Transpose() — no arguments.

__call__:

y = op(x, ctx=ctx)x [S, D_0, D_1][S, D_1, D_0]. BATCHED iff the input is BATCHED, else RAGGED.