numpy.cumprod() in Python
numpy.cumprod() function is used when we want to compute the cumulative product of array elements over a given axis. Syntax : numpy.cumprod(arr, axis=None, dtype=None, out=None) Parameters : arr : [array_like] Array containing numbers whose cumulative product is desired. If arr is not an array, a co