Which function is used to calculate the cumulative sum of elements along a specified axis in NumPy?
Correct answer
B. np.cumsum()
14 views
B. np.cumsum()
14 views
The np.cumsum() function computes the cumulative sum of elements along a specified axis. It is particularly useful when you need to analyze the cumulative effect of incremental changes in data over time or across dimensions.
Not sure why the answer is B? Ask here and get an explanation.