mlx.core.logsumexp#
- mlx.core.logsumexp(a: array, /, axis: Union[None, int, List[int]] = None, keepdims: bool = False, *, stream: Union[None, Stream, Device] = None) array#
A log-sum-exp reduction over the given axes.
The log-sum-exp reduction is a numerically stable version of:
log(sum(exp(a), axis))
- Parameters:
- Returns:
The output array with the corresponding axes reduced.
- Return type: