Explain the concept and use of masked arrays (np.ma) in NumPy.
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how NumPy masked arrays pair data with a boolean mask to handle missing or invalid entries. Tests whether you know how masks behave in aggregations and arithmetic, how to build and remove them, and when NaN-aware functions or pandas are the better choice.