broadcast_shapes

Contents

broadcast_shapes#

class saiunit.math.broadcast_shapes(*shapes)#

Broadcast a sequence of array shapes.

Parameters:

*shapes (tuple of int) – The shapes of the arrays to broadcast.

Returns:

broadcast_shape – The broadcasted shape.

Return type:

tuple of int

Examples

>>> import saiunit.math as sumath
>>> sumath.broadcast_shapes((2, 1), (1, 3))
(2, 3)