Explain how boolean masking works in NumPy and why it matters for filtering or modifying elements by condition
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Explain how NumPy builds a boolean mask from a condition and uses it to select or overwrite array elements. It tests vectorized thinking, combining conditions with elementwise operators, what masked indexing returns, and how masked assignment changes an array in place.