Commit 735b0dd7 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

allow empty post-op

parent b9b19151
Pipeline #26826 passed with stages
in 14 minutes and 21 seconds
...@@ -51,8 +51,10 @@ class StatCalculator(object): ...@@ -51,8 +51,10 @@ class StatCalculator(object):
def probe_with_posterior_samples(op, post_op, nprobes): def probe_with_posterior_samples(op, post_op, nprobes):
sc = StatCalculator() sc = StatCalculator()
for i in range(nprobes): for i in range(nprobes):
sample = post_op(op.draw_sample(from_inverse=True)) if post_op is None:
sc.add(sample) sc.add(op.draw_sample(from_inverse=True))
if nprobes == 1: if nprobes == 1:
return sc.mean, None return sc.mean, None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment