dpnp.broadcast_shapes

dpnp.broadcast_shapes(*args)[source]

Broadcast the input shapes into a single shape.

For full documentation refer to numpy.broadcast_shapes.

Parameters:

*args (tuples of ints, or ints) -- The shapes to be broadcast against each other.

Returns:

Broadcasted shape.

Return type:

tuple

See also

dpnp.broadcast_arrays

Broadcast any number of arrays against each other.

dpnp.broadcast_to

Broadcast an array to a new shape.

Examples

>>> import dpnp as np
>>> np.broadcast_shapes((1, 2), (3, 1), (3, 2))
(3, 2)
>>> np.broadcast_shapes((6, 7), (5, 6, 1), (7,), (5, 1, 7))
(5, 6, 7)