Use np.sum() in logsumexp