cumlogsumexp

Contents

cumlogsumexp#

class saiunit.lax.cumlogsumexp(x, axis=0, reverse=False, unit_to_scale=None, **kwargs)#

Compute a cumulative logsumexp along axis.

Parameters:
  • x (Union[saiunit.Quantity, Array, ndarray, number, bool]) – Input array. Must be dimensionless or scaled via unit_to_scale.

  • axis (Optional[int]) – The axis along which to compute. Default is 0.

  • reverse (Optional[bool]) – If True, compute in reverse order. Default is False.

  • unit_to_scale (Optional[saiunit.Unit]) – If provided, x is scaled by this unit before applying the function.

Returns:

result – Always unitless.

Return type:

Array