code: def cumprod(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      axis: int = 0,
      exclusive: bool = False,
      reverse: bool = False,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Return the cumulative product of the elements along a given axis.
  
      Parameters
      ----------
      x
          Input array.
      axis
          int , axis along which the cumulative product is computed. By default 0.
      exclusive
          optional bool, Whether to perform the cumprod exclusively. Defaults is False.
      reverse
          Whether to perform the cumprod from last to first element in the selected
          axis. Default is ``False`` (from first to last element)
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          Input array with cumulatively multiplied elements along axis.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([2, 3, 4])
      >>> y = ivy.cumprod(x)
      >>> print(y)
      ivy.array([2, 6, 24])
  
      >>> x = ivy.array([2, 3, 4])
      >>> y = ivy.cumprod(x, exclusive=True)
      >>> print(y)
      ivy.array([1, 2, 6])
  
      >>> x = ivy.array([[2, 3],
                         [5, 7],
                         [11, 13]])
      >>> y = ivy.zeros((3, 2))
      >>> ivy.cumprod(x, axis=1, exclusive=True, out=y)
      >>> print(y)
      ivy.array([[ 1.,  2.],
                 [ 1.,  5.],
                 [ 1., 11.]])
  
      >>> x = ivy.array([[2, 3],[5, 7],[11, 13]])
      >>> ivy.cumprod(x, axis=0, exclusive=True, out=x)
      >>> print(x)
      ivy.array([[1,  1],
                 [2,  3],
                 [10, 21]])
  
      >>> x = ivy.array([[2, 3],[5, 7],[11, 13]])
      >>> y = ivy.zeros((3, 2))
      >>> x.cumprod(axis=0, exclusive=True, out=y)
      >>> print(x)
      ivy.array([[1.,  1.],
                  [2.,  3.],
                  [10., 21.]])
  
      With :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([2, 3, 4]), b=ivy.array([3, 4, 5]))
      >>> y = ivy.cumprod(x)
      >>> print(y)
      {
          a: ivy.array([2, 6, 24]),
          b: ivy.array([3, 12, 60])
      }
  
      >>> x = ivy.Container(a=ivy.array([2, 3, 4]), b=ivy.array([3, 4, 5]))
      >>> y = ivy.cumprod(x, exclusive=True)
      >>> print(y)
      {
          a: ivy.array([1, 2, 6]),
          b: ivy.array([1, 3, 12])
      }
  
      >>> x = ivy.Container(a=ivy.array([[2, 3],
                                         [5, 7],
                                         [11, 13]]),
                            b=ivy.array([[3, 4],
                                         [4, 5],
                                         [5, 6]]))
      >>> y = ivy.Container(a = ivy.zeros((3, 2)), b = ivy.zeros((3, 2)))
      >>> ivy.cumprod(x, axis=1, exclusive=True, out=y)
      >>> print(y)
      {
          a: ivy.array([[1, 2],
                        [1, 5],
                        [1, 11]]),
          b: ivy.array([[1, 3],
                        [1, 4],
                        [1, 5]])
      }
  
      >>> x = ivy.Container(a=ivy.array([[2, 3],
                                          [5, 7],
                                          [11, 13]]),
                              b=ivy.array([[3, 4],
                                          [4, 5],
                                          [5, 6]]))
      >>> x.cumprod(axis=0, exclusive=True, out=x)
      >>> print(x)
      {
          a: ivy.array([[1, 1],
                        [2, 3],
                        [10, 21]]),
          b: ivy.array([[1, 1],
                        [3, 4],
                        [15, 42]])
      }
      """
      return current_backend(x).cumprod(
          x,
          axis=axis,
          exclusive=exclusive,
          reverse=reverse,
          dtype=dtype,
          out=out,
      )
  
file_path: ivy/ivy/functional/ivy/statistical.py
imports: from typing import Union, Optional, Sequence
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 10 for calling a global function with example usage: cumprod() and returns: current_backend