How do np.any and np.all work, and how are they used with boolean arrays?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how NumPy's np.any and np.all reduce arrays to truth values and how they are used with boolean masks and comparisons. Tests understanding of the axis argument, how numeric values are treated, and the ambiguous truth-value error.