Skip to main content

logaddexp

Function logaddexp 

Source
pub fn logaddexp(
    a: impl Into<ScalarOrArray>,
    b: impl Into<ScalarOrArray>,
) -> Result<Array>
Expand description

Element-wise log(exp(a) + exp(b)), computed stably as MLX does: the larger operand plus log1p(exp(smaller − larger)), or the larger one when the smaller is −∞ or the larger +∞. Integers are promoted to floating point; NaN propagates. Not defined for complex numbers.