docstr: ivy.Array instance method variant of ivy.cumsum. This method simply
  wraps the function, and so the docstring for ivy.cumsum also applies to
  this method with minimal changes.
  
  Parameters
  ----------
  self
      Input array to apply cumsum.
  axis
      Axis along which the cumulative sum is computed. Default is ``0``.
  exclusive
      Whether to perform cumsum exclusively. Default is ``False``.
  reverse
      Whether to perform the cumsum from last to first element in the selected
      axis. Default is ``False`` (from first to last element)
  dtype
      Data type of the returned array. Default is ``None``.
  out
      Optional array container. Default is ``None``.
  
  Returns
  -------
  ret
      Array which holds the result of applying cumsum at each
      original array elements along the specified axis.
  
  Examples
  --------
  >>> x = ivy.array([1, 2, 3, 4, 5])
  >>> y = x.cumsum()
  >>> print(y)
  ivy.array([ 1,  3,  6, 10, 15])
  
  >>> x = ivy.array([2, 6, 4, 10])
  >>> y = x.cumsum(axis=0, exclusive=False, reverse=True, dtype='float64')
  >>> print(y)
  ivy.array([22., 20., 14., 10.])
  
  >>> x = ivy.array([[2, 3], [4, 6], [8, 12]])
  >>> y = ivy.zeros((3, 2))
  >>> x.cumsum(axis=1, exclusive=True, reverse=False, out=y)
  >>> print(y)
  ivy.array([[0, 2],
             [0, 4],
             [0, 8]])
  
  >>> x = ivy.array([[1, 5, 2],
  ...                [4, 3, 0],
  ...                [4, 8, 2]])
  >>> y = x.cumsum(axis=1, exclusive=True, reverse=True)
  >>> print(y)
  ivy.array([[ 7,  2,  0],
             [ 3,  0,  0],
             [10,  2,  0]])
  
  >>> x = ivy.array([[1, 5, 10], [4, 8, 10], [2, 3, 5]])
  >>> x.cumsum(axis=0, out=x)
  >>> print(x)
  ivy.array([[ 1,  5, 10],
             [ 5, 13, 20],
             [ 7, 16, 25]])
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.cumsum",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.cumsum","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","Input","array","to","apply","cumsum",".","axis","Axis","along","which","the","cumulative","sum","is","computed",".","Default","is","``","0","``",".","exclusive","Whether","to","perform","cumsum","exclusively",".","Default","is","``","False","``",".","reverse","Whether","to","perform","the","cumsum","from","last","to","first","element","in","the","selected","axis",".","Default","is","``","False","``","(","from","first","to","last","element",")","dtype","Data","type","of","the","returned","array",".","Default","is","``","None","``",".","out","Optional","array","container",".","Default","is","``","None","``",".","Returns","--","--","--","-","ret","Array","which","holds","the","result","of","applying","cumsum","at","each","original","array","elements","along","the","specified","axis",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","1",",","2",",","3",",","4",",","5","]",")",">",">",">","y","=","x.cumsum","(",")",">",">",">","print","(","y",")","ivy.array","(","[","1",",","3",",","6",",","10",",","15","]",")",">",">",">","x","=","ivy.array","(","[","2",",","6",",","4",",","10","]",")",">",">",">","y","=","x.cumsum","(","axis=0",",","exclusive=False",",","reverse=True",",","dtype='float64","'",")",">",">",">","print","(","y",")","ivy.array","(","[","22.",",","20.",",","14.",",","10",".","]",")",">",">",">","x","=","ivy.array","(","[","[","2",",","3","]",",","[","4",",","6","]",",","[","8",",","12","]","]",")",">",">",">","y","=","ivy.zeros","(","(","3",",","2",")",")",">",">",">","x.cumsum","(","axis=1",",","exclusive=True",",","reverse=False",",","out=y",")",">",">",">","print","(","y",")","ivy.array","(","[","[","0",",","2","]",",","[","0",",","4","]",",","[","0",",","8","]","]",")",">",">",">","x","=","ivy.array","(","[","[","1",",","5",",","2","]",",","...","[","4",",","3",",","0","]",",","...","[","4",",","8",",","2","]","]",")",">",">",">","y","=","x.cumsum","(","axis=1",",","exclusive=True",",","reverse=True",")",">",">",">","print","(","y",")","ivy.array","(","[","[","7",",","2",",","0","]",",","[","3",",","0",",","0","]",",","[","10",",","2",",","0","]","]",")",">",">",">","x","=","ivy.array","(","[","[","1",",","5",",","10","]",",","[","4",",","8",",","10","]",",","[","2",",","3",",","5","]","]",")",">",">",">","x.cumsum","(","axis=0",",","out=x",")",">",">",">","print","(","x",")","ivy.array","(","[","[","1",",","5",",","10","]",",","[","5",",","13",",","20","]",",","[","7",",","16",",","25","]","]",")"]
code: def cumsum(
      self: ivy.Array,
      axis: int = 0,
      exclusive: bool = False,
      reverse: bool = False,
      *,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.cumsum. This method simply
      wraps the function, and so the docstring for ivy.cumsum also applies to
      this method with minimal changes.
  
      Parameters
      ----------
      self
          Input array to apply cumsum.
      axis
          Axis along which the cumulative sum is computed. Default is ``0``.
      exclusive
          Whether to perform cumsum exclusively. Default is ``False``.
      reverse
          Whether to perform the cumsum from last to first element in the selected
          axis. Default is ``False`` (from first to last element)
      dtype
          Data type of the returned array. Default is ``None``.
      out
          Optional array container. Default is ``None``.
  
      Returns
      -------
      ret
          Array which holds the result of applying cumsum at each
          original array elements along the specified axis.
  
      Examples
      --------
      >>> x = ivy.array([1, 2, 3, 4, 5])
      >>> y = x.cumsum()
      >>> print(y)
      ivy.array([ 1,  3,  6, 10, 15])
  
      >>> x = ivy.array([2, 6, 4, 10])
      >>> y = x.cumsum(axis=0, exclusive=False, reverse=True, dtype='float64')
      >>> print(y)
      ivy.array([22., 20., 14., 10.])
  
      >>> x = ivy.array([[2, 3], [4, 6], [8, 12]])
      >>> y = ivy.zeros((3, 2))
      >>> x.cumsum(axis=1, exclusive=True, reverse=False, out=y)
      >>> print(y)
      ivy.array([[0, 2],
                 [0, 4],
                 [0, 8]])
  
      >>> x = ivy.array([[1, 5, 2],
      ...                [4, 3, 0],
      ...                [4, 8, 2]])
      >>> y = x.cumsum(axis=1, exclusive=True, reverse=True)
      >>> print(y)
      ivy.array([[ 7,  2,  0],
                 [ 3,  0,  0],
                 [10,  2,  0]])
  
      >>> x = ivy.array([[1, 5, 10], [4, 8, 10], [2, 3, 5]])
      >>> x.cumsum(axis=0, out=x)
      >>> print(x)
      ivy.array([[ 1,  5, 10],
                 [ 5, 13, 20],
                 [ 7, 16, 25]])
      """
      return ivy.cumsum(
          self._data, axis, exclusive, reverse, dtype=dtype, out=out
      )
  
file_path: ivy/ivy/data_classes/array/statistical.py
imports: from typing import Optional, Union, Sequence
  import abc
  import ivy
label_desc: Use image node_id 8 for calling the _ArrayWithStatistical obj's underlying member method code with example usage: obj.cumsum(axis, exclusive, reverse) and returns: ivy