Why must you use &, |, and ~ instead of the Python and/or/not keywords when combining boolean array conditions in NumPy?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: A NumPy question about combining boolean array conditions with &, | and ~ instead of the Python and, or and not keywords. It tests how Python evaluates truth values, how NumPy overloads operators for element-wise work, and why operator precedence matters when building a mask.