How do you calculate the cumulative sum or product of a NumPy array?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to compute a running sum or running product of a NumPy array and how the result behaves on 2D input. Tests knowledge of the axis argument, the default flattening, NaN handling and integer overflow in long cumulative products.