Skip to main content
Loading page…
Python Mastery
Chapter 40
Lesson 3 of 4
Broadcasting & Aggregation
Contents
Notes
Tutor
Concept
Broadcasting — The Three Rules
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
28 min
9 activities
0 of 9 done
In this lesson
1
Broadcasting — The Three Rules
2
Aggregation Functions and the axis Concept
3
np.where() — Conditional Element Selection
4
Per-Student Normalisation with Broadcasting
5
Sales Analysis with Aggregation
6
Predicting Broadcasting Output Shape
7
Aggregation Direction
8
Gotcha: Forgetting keepdims After Aggregation
9
np.where Three-Argument Form
Objectives
Predict the output shape of a NumPy broadcasting operation by applying the three broadcasting rules
Reduce an array along a specified axis using sum, mean, std, min, and max
Use argmin and argmax to find the index of extreme values
Compute cumulative sums with cumsum
Apply np.where() for conditional element selection
Chapter 40 · NumPy: Fast Numerical Computing
The ndarray
Indexing, Slicing & Vectorization
Broadcasting & Aggregation
Linear Algebra & Random
Previous: Indexing, Slicing & Vectorization
Next: Linear Algebra & Random