You can check the source code defining logsumexp here . (Note that there is a link to the source on the document page ).
You will see:
a_max = a.max(axis=0) ... out = log(sum(exp(a - a_max), axis=0))
So yes, scipy logsumexp subtracts the maximum from each element.
source share