Boolean Indexing
Filter with conditions:
a = np.array([15, 22, 8, 41, 3, 30]) a[a > 20] # [22, 41, 30]
Why this matters
Boolean masks are how you express filters in one expression: keep rows that pass a test, drop noise, or tag outliers—without slow Python loops over elements.
This pattern is the NumPy side of what becomes .loc with boolean Series in pandas.
ResourcesDocs, references & more — opens in a new tab
🎯 Your Task
Given scores = np.array([45,82,91,67,55,98,73,88]), create passing with scores ≥ 70.
scores[scores >= 70]
⌘⏎ run · ⌘← → nav
▶ Output
Run your code to see output here.