pymc.distributions.shape_utils.shapes_broadcasting(*args, raise_exception=False)[source]#

Return the shape resulting from broadcasting multiple shapes. Represents numpy’s broadcasting rules.

*args: array-like of int

Tuples or arrays or lists representing the shapes of arrays to be broadcast.

raise_exception: bool (optional)

Controls whether to raise an exception or simply return None if the broadcasting fails.

Resulting shape. If broadcasting is not possible and raise_exception is
False, then None is returned. If raise_exception is True, a
ValueError is raised.