Skip to content
GitLab
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
d7a08567
Commit
d7a08567
authored
Apr 26, 2020
by
Martin Reinecke
Browse files
temporary fix for probing
parent
461b4ca4
Pipeline
#73744
passed with stages
in 20 minutes and 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d7a08567
...
...
@@ -5,6 +5,7 @@ Interface change in EndomorphicOperator.draw_sample()
This method now requires a `dtype` argument to be passed.
As a consequence, `dtype` moves to the first place of the argument list.
(This of course applies to all derived classes as well.)
MPI parallelisation over samples in MetricGaussianKL
====================================================
...
...
nifty6/probing.py
View file @
d7a08567
...
...
@@ -97,10 +97,12 @@ def probe_with_posterior_samples(op, post_op, nprobes):
raise
ValueError
sc
=
StatCalculator
()
for
i
in
range
(
nprobes
):
# FIXME which dtype should we use here?
import
numpy
as
np
if
post_op
is
None
:
sc
.
add
(
op
.
draw_sample
(
from_inverse
=
True
))
sc
.
add
(
op
.
draw_sample
(
dtype
=
np
.
float64
,
from_inverse
=
True
))
else
:
sc
.
add
(
post_op
(
op
.
draw_sample
(
from_inverse
=
True
)))
sc
.
add
(
post_op
(
op
.
draw_sample
(
dtype
=
np
.
float64
,
from_inverse
=
True
)))
if
nprobes
==
1
:
return
sc
.
mean
,
None
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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