Broadcast the input shapes into a single shape.
Learn more about broadcasting here.
New in version 1.20.0.
The shapes to be broadcast against each other.
Broadcasted shape.
If the shapes are not compatible and cannot be broadcast according to NumPy’s broadcasting rules.
See also
>>> import numpy 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)
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.broadcast_shapes.html