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
58c2740f
Commit
58c2740f
authored
May 13, 2020
by
Philipp Arras
Browse files
Simplify
parent
d1b554b8
Pipeline
#74859
passed with stages
in 20 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/operators/sampling_enabler.py
View file @
58c2740f
...
...
@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-20
19
Max-Planck-Society
# Copyright(C) 2013-20
20
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
...
...
@@ -61,6 +61,7 @@ class SamplingEnabler(EndomorphicOperator):
self
.
_op
=
likelihood
+
prior
self
.
_domain
=
self
.
_op
.
domain
self
.
_capability
=
self
.
_op
.
capability
self
.
apply
=
self
.
_op
.
apply
def
draw_sample
(
self
,
from_inverse
=
False
):
try
:
...
...
@@ -88,9 +89,6 @@ class SamplingEnabler(EndomorphicOperator):
def
draw_sample_with_dtype
(
self
,
dtype
,
from_inverse
=
False
):
return
self
.
_op
.
draw_sample_with_dtype
(
dtype
,
from_inverse
)
def
apply
(
self
,
x
,
mode
):
return
self
.
_op
.
apply
(
x
,
mode
)
def
__repr__
(
self
):
from
..utilities
import
indent
return
"
\n
"
.
join
((
...
...
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