Skip to content
Snippets Groups Projects
Commit bfd7510e authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Merge branch 'combined_result_log_err' into 'master'

Add catch for empty log_evidence_err array

See merge request !511
parents facebc86 8b595c2b
No related branches found
No related tags found
1 merge request!511Add catch for empty log_evidence_err array
Pipeline #67233 passed with warnings
......@@ -1336,7 +1336,10 @@ class ResultList(list):
else:
result.log_bayes_factor = result.log_evidence - result.log_noise_evidence
log_errs = [res.log_evidence_err for res in self if np.isfinite(res.log_evidence_err)]
result.log_evidence_err = logsumexp(2 * np.array(log_errs), b=1. / len(self))
if len(log_errs) > 0:
result.log_evidence_err = logsumexp(2 * np.array(log_errs), b=1. / len(self))
else:
result.log_evidence_err = np.nan
result_weights = np.exp(log_evidences - np.max(log_evidences))
posteriors = []
for res, frac in zip(self, result_weights):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment