torch.transpose_error_requires_2d_tensor
export type transpose_error_requires_2d_tensor<ActualShape extends Shape> =
ErrorShape<`transpose_error_requires_2d_tensor`> & {
readonly _actual_shape: ActualShape;
readonly _actual_ndim: ActualShape['length'];
};ActualShapeextends ShapeTranspose requires 2D tensor error. Occurs when calling .t() on a non-2D tensor.
Examples
const a = torch.zeros(2, 3, 4); // 3D tensor
const b = a.t(); // ERROR: not 2D
// b.shape is transpose_error_requires_2d_tensor<[2, 3, 4]>