This is documentation for an old release of SciPy (version 0.10.0). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.maxentropy.logsumexp

scipy.maxentropy.logsumexp(a)

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

Parameters :

a : array_like

Input array.

Returns :

res : ndarray

The result, np.log(np.sum(np.exp(a))) calculated in a numerically more stable way.

Notes

Numpy has a logaddexp function which is very similar to logsumexp.

Previous topic

scipy.maxentropy.innerprodtranspose

This Page