torch.Tensor.AnyTensor
export type AnyTensor = Tensor<any, any, any>;Internal type that accepts any Tensor regardless of shape, dtype, or device. Used for internal methods that don't need shape/dtype/device tracking.
We use Tensor<any, any, any> to bypass TypeScript's invariance checks
for class generics. This is safe because:
- Shape, dtype, and device are only used for compile-time checking
- Runtime behavior is identical regardless of type parameters