Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
735b0dd7
Commit
735b0dd7
authored
Apr 05, 2018
by
Martin Reinecke
Browse files
allow empty post-op
parent
b9b19151
Pipeline
#26826
passed with stages
in 14 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/probing/utils.py
View file @
735b0dd7
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment