Broadcasting in NumPy
This lesson explains broadcasting in NumPy in detail.
What is Broadcasting in NumPy?
The term broadcasting describes how numpy treats arrays with different shapes during arithmetic operations. Subject to certain constraints, the smaller array is “broadcast” across the larger array so that they have compatible shapes. Broadcasting provides a means of vectorizing array operations.
General rules for Broadcasting
When operating on two arrays, NumPy compares their shapes element-wise. It ...
Access this course and 1400+ top-rated courses and projects.