whose lengths match the ranks of the corresponding tensors.
▪
Indices may be any expression (typically strings or symbols). Each index appearing in more than one tensor identifies an axis along which the inputs are aligned and broadcast.
▪
The output indices are the union of the input indices in canonical (first-occurrence) order. The output tensor has one axis per output index, with dimension equal to the maximum size of that index across the inputs.
▪
Tensors that do not carry every output index are extended by repetition: each missing axis is padded with the
when the tensor has dimension 1 along that axis, and otherwise filled with 1. Tensors that share an index but have different sizes along it are aligned by padding the smaller dimension with 1.
does not contract repeated indices; it only broadcasts and multiplies. Repeated indices within a single tensor are preserved as separate axes in the output.