Return the common shape to which shapes broadcast.
Applies the standard right-aligned broadcasting rules across zero or
more shape sequences: two dimensions are compatible when they are
equal or one of them is 1, in which case the output dimension is
their non-unit size (or 0 when an axis has length 0 paired
with 0 or 1).
Parameters
*shapesSequence[int]Zero or more shape tuples or lists of non-negative dimension sizes.
Returns
tuple[int, ...]The broadcasted shape tuple (() when called with no arguments).
Raises
ValueErrorIf any dimension size is negative.
lucid._C.engine.ShapeMismatchIf any two shapes have incompatible non-unit dimensions along the
same right-aligned axis.
Examples
>>> import lucid
>>> lucid.broadcast_shapes((2, 1, 3), (4, 1))
(2, 4, 3)
>>> lucid.broadcast_shapes()
()