cumlogsumexp

Contents

cumlogsumexp#

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

Compute a cumulative logsumexp along axis.

Parameters:
  • x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Input array. Must be dimensionless or scaled via unit_to_scale.

  • axis (int | None) – The axis along which to compute. Default is 0.

  • reverse (bool | None) – If True, compute in reverse order. Default is False.

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

Returns:

result – Always unitless.

Return type:

Array