Broadcasting in Python
Use this demonstration to explore the broadcasting mechanism in Python. If we have twonumpy
arrays a
and b
,
we can sometimes form a*b
even if the shapes of a
and b
are different. You can choose the shapes of a
and b
below to see an explanation of how the broadcasting works.