mlx.core.logcumsumexp

mlx.core.logcumsumexp#

logcumsumexp(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#

Return the cumulative logsumexp of the elements along the given axis.

參數:
  • a (array) -- 輸入陣列

  • axis (int, optional) -- Optional axis to compute the cumulative logsumexp over. If unspecified the cumulative logsumexp of the flattened array is returned.

  • reverse (bool) -- Perform the cumulative logsumexp in reverse.

  • inclusive (bool) -- The i-th element of the output includes the i-th element of the input.

回傳值:

輸出陣列。

回傳值型別:

array