We'll now repeat the observation that arrays are merely functions of several variables (see Section 4.2: Mathematical preliminaries). Array broadcasting thus follows exactly the same procedure as explained above for mathematical functions. Broadcasting is done automatically in NumPy.
In Figure 5.1, we show what happens when adding a matrix of shape (4, 3) to a matrix of size (1, 3). The resulting matrix is of the shape (4, 3):
Figure 5.1: Broadcasting between a matrix and a vector