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
8e168463
Commit
8e168463
authored
Jun 20, 2020
by
Philipp Arras
Browse files
Merge branch 'backport' into 'NIFTy_6'
Fail on complex sampling in VariableVarianceEnergy See merge request
!544
parents
0b7b4e88
2406d4f3
Pipeline
#77671
passed with stages
in 24 minutes and 53 seconds
Changes
1
Pipelines
11
Hide whitespace changes
Inline
Side-by-side
nifty6/operators/energy_operators.py
View file @
8e168463
...
...
@@ -27,7 +27,7 @@ from .linear_operator import LinearOperator
from
.operator
import
Operator
from
.sampling_enabler
import
SamplingDtypeSetter
,
SamplingEnabler
from
.scaling_operator
import
ScalingOperator
from
.simple_linear_operators
import
VdotOperator
,
FieldAdapter
from
.simple_linear_operators
import
VdotOperator
def
_check_sampling_dtype
(
domain
,
dtypes
):
...
...
@@ -156,6 +156,10 @@ class VariableCovarianceGaussianEnergy(EnergyOperator):
self
.
_domain
=
MultiDomain
.
make
({
self
.
_r
:
dom
,
self
.
_icov
:
dom
})
self
.
_sampling_dtype
=
sampling_dtype
_check_sampling_dtype
(
self
.
_domain
,
sampling_dtype
)
if
np
.
issubdtype
(
self
.
_sampling_dtype
,
np
.
complexfloating
):
raise
NotImplementedError
(
(
'Complex sampling not implemented in NIFTy_6. '
,
'Switch to NIFTy_7 for this feature.'
))
def
apply
(
self
,
x
):
self
.
_check_input
(
x
)
...
...
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