1. Home
  2. Data Science
  3. NumPy
  4. Which function is used to compute the cumulative product…

Added 25 Feb 2024

Which function is used to compute the cumulative product of elements along a specified axis in NumPy?

  1. np.prod()
  2. np.cumprod() Correct answer
  3. np.mean()
  4. np.median()

Correct answer

B. np.cumprod()

13 views

MCQSEXAM

Explanation

The np.cumprod() function computes the cumulative product of elements along a specified axis. It is helpful for analyzing the cumulative effect of successive multiplications in datasets.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More NumPy MCQs

Practise all NumPy MCQs

Similar MCQs