pymc.distributions.shape_utils.broadcast_dist_samples_shape(shapes, size=None)[source]#

Apply shape broadcasting to shape tuples but assuming that the shapes correspond to draws from random variables, with the size tuple possibly prepended to it. The size prepend is ignored to consider if the supplied shapes can broadcast or not. It is prepended to the resulting broadcasted shapes, if any of the shape tuples had the size prepend.

shapes: Iterable of tuples holding the distribution samples shapes
size: None, int or tuple (optional)

size of the sample set requested.

tuple of the resulting shape