mlx.core.logaddexp

目录

mlx.core.logaddexp#

logaddexp(a: scalar | array, b: scalar | array, /, *, stream: 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)).

参数:
  • a (array) -- Input array or scalar.

  • b (array) -- Input array or scalar.

返回:

The log-add-exp of a and b.

返回类型:

array