pymc.math.logsumexp#

pymc.math.logsumexp(x, axis=None, keepdims=False)[source]#

Compute the log of the sum of exponentials of input elements.

See scipy.special.logsumexp.

Parameters:
xsymbolic tensor

Input

axisNone or int or tuple of ints, optional

Axis or axes over which the sum is taken. By default axis is None, and all elements are summed.

keepdimsbool, optional

If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the original array.

Returns:
tensor