Lesson 9 of 60
pythonBroadcasting in NumPy
20 minutes
Course progress15%
Broadcasting
Broadcasting allows NumPy to perform arithmetic operations on arrays of different shapes by implicitly expanding the smaller array.
Simple broadcast example
import numpy as np
A = np.arange(6).reshape(2,3)
B = np.array([10, 20, ])
C = A + B
(C)