The last ingredient is the convention for how to add the extra arguments to a function, that is, how the reshaping is automatically performed. By convention, a function is automatically reshaped by adding zeros on the left.
For example, if a function of two arguments has to be reshaped to three arguments, the new function will be defined by:
Â
After having seen a more mathematical motivation for broadcasting, we now show how this applies to NumPy arrays.