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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
13006f60
Commit
13006f60
authored
Mar 26, 2018
by
Martin Reinecke
Browse files
move draw_sample() from LinearOperator to EndomorphicOperator
parent
37e802de
Pipeline
#26480
passed with stage
in 5 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/operators/endomorphic_operator.py
View file @
13006f60
...
...
@@ -34,3 +34,16 @@ class EndomorphicOperator(LinearOperator):
Returns `self.domain`, because this is also the target domain
for endomorphic operators."""
return
self
.
domain
def
draw_sample
(
self
):
"""Generate a zero-mean sample
Generates a sample from a Gaussian distribution with zero mean and
covariance given by the operator.
Returns
-------
Field
A sample from the Gaussian of given covariance.
"""
raise
NotImplementedError
nifty4/operators/linear_operator.py
View file @
13006f60
...
...
@@ -264,16 +264,3 @@ class LinearOperator(NiftyMetaBase()):
self
.
_check_mode
(
mode
)
if
x
.
domain
!=
self
.
_dom
(
mode
):
raise
ValueError
(
"The operator's and field's domains don't match."
)
def
draw_sample
(
self
):
"""Generate a zero-mean sample
Generates a sample from a Gaussian distribution with zero mean and
covariance given by the operator.
Returns
-------
Field
A sample from the Gaussian of given covariance.
"""
raise
NotImplementedError
Write
Preview
Markdown
is supported
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