TypeTensor - v0.1.0
    Preparing search index...

    Type Alias Reshape<From, To>

    Reshape: CanReshape<From, To> extends true ? To : never

    Reshape a tensor to a new shape Returns the new shape if valid (same total elements), never if invalid

    Type Parameters

    type Reshaped = Reshape<[2, 3, 4], [6, 4]> // [6, 4] - valid (24 = 24)
    type Invalid = Reshape<[2, 3], [4, 5]> // never - invalid (6 ≠ 20)