# mlx.core.logaddexp — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.logaddexp

mlx.core.logaddexp(a: Union[scalar, array ], b: Union[scalar, array ], /, *, stream: Union[ None , Stream , Device ] = None) → array

  Element-wise log-add-exp.

  This is a numerically stable log-add-exp of two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

  The computation is is a numerically stable version of `log(exp(a) + exp(b))`.

  Parameters:

    - a (array) – Input array or scalar.

    - b (array) – Input array or scalar.

  Returns:

    The log-add-exp of `a` and `b`.

  Return type:

    array