TypeTensor - v0.1.0
    Preparing search index...

    Type Alias Transpose<T, Axes>

    Transpose: Axes extends undefined
        ? TransposeLastTwo<T>
        : Axes extends readonly number[] ? Permute<T, Axes> : never

    Transpose dimensions of a shape

    If no axes are provided, swaps the last two dimensions (like matrix transpose) If axes are provided, permutes dimensions according to the axes array

    Type Parameters

    • T extends Shape
    • Axes extends readonly number[] | undefined = undefined
    type Transposed = Transpose<[2, 3, 4]> // [2, 4, 3] - default behavior
    type Custom = Transpose<[2, 3, 4], [2, 0, 1]> // [4, 2, 3] - custom permutation