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

allow empty post-op

parent b9b19151
Pipeline #26826 passed with stages
in 14 minutes and 21 seconds
......@@ -51,8 +51,10 @@ class StatCalculator(object):
def probe_with_posterior_samples(op, post_op, nprobes):
sc = StatCalculator()
for i in range(nprobes):
sample = post_op(op.draw_sample(from_inverse=True))
sc.add(sample)
if post_op is None:
sc.add(op.draw_sample(from_inverse=True))
else:
sc.add(post_op(op.draw_sample(from_inverse=True)))
if nprobes == 1:
return sc.mean, None
......
Markdown is supported
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