class_docstr: Computes the cumulative sum of a tensor along a specified axis.
  
  If `axis` is not provided, the default uses the rightmost dimension, i.e.,
  axis=-1.
  
  #### Example
  
  ```python
  x = tfb.Cumsum()
  
  x.forward([[1., 1.],
             [2., 2.],
             [3., 3.]])
  # ==> [[1., 2.],
         [2., 4.],
         [3., 6.]]
  
  x = tfb.Cumsum(axis=-2)
  
  x.forward([[1., 1.],
             [2., 2.],
             [3., 3.]])
  # ==> [[1., 1.],
         [3., 3.],
         [6., 6.]]
  ```
docstr: Instantiates the `Cumsum` bijector.
  
  Args:
    axis: Negative Python `int` indicating the axis along which to compute the
      cumulative sum. Note that positive (and zero) values are not supported.
    validate_args: Python `bool` indicating whether arguments should be
      checked for correctness.
    name: Python `str` name given to ops managed by this object.
  
  Raises:
    TypeError: if `axis` is not an `int`.
    ValueError: if `axis` is not negative.
code: def __init__(self, axis=-1, validate_args=False, name="cumsum"):
      """Instantiates the `Cumsum` bijector.
  
      Args:
        axis: Negative Python `int` indicating the axis along which to compute the
          cumulative sum. Note that positive (and zero) values are not supported.
        validate_args: Python `bool` indicating whether arguments should be
          checked for correctness.
        name: Python `str` name given to ops managed by this object.
  
      Raises:
        TypeError: if `axis` is not an `int`.
        ValueError: if `axis` is not negative.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          if not isinstance(axis, int):
              raise TypeError(
                  "Argument `axis` is not an `int` type; got {}".format(
                      axis
                  )
              )
          if axis >= 0:
              raise ValueError(
                  "Argument `axis` must be negative; got {}".format(
                      axis
                  )
              )
          self._axis = axis
          super(Cumsum, self).__init__(
              is_constant_jacobian=True,
              # Positive because we verify `axis < 0`.
              forward_min_event_ndims=-axis,
              validate_args=validate_args,
              parameters=parameters,
              name=name,
          )
  
file_path: probability/tensorflow_probability/python/bijectors/cumsum.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 1 to create a new Cumsum object from inherited base classes: bijector with example: obj = Cumsum(axis, validate_args, name)