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
694d61dc
Commit
694d61dc
authored
Sep 10, 2018
by
Martin Reinecke
Browse files
bug fixes and new test
parent
94d60caa
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/simple_linear_operators.py
View file @
694d61dc
...
...
@@ -45,7 +45,7 @@ class VdotOperator(LinearOperator):
class
SumReductionOperator
(
LinearOperator
):
def
__init__
(
self
,
domain
):
self
.
_domain
=
domain
self
.
_domain
=
DomainTuple
.
make
(
domain
)
self
.
_target
=
DomainTuple
.
scalar_domain
()
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
...
...
@@ -58,7 +58,7 @@ class SumReductionOperator(LinearOperator):
class
ConjugationOperator
(
EndomorphicOperator
):
def
__init__
(
self
,
domain
):
self
.
_domain
=
domain
self
.
_domain
=
DomainTuple
.
make
(
domain
)
self
.
_capability
=
self
.
_all_ops
def
apply
(
self
,
x
,
mode
):
...
...
@@ -68,7 +68,7 @@ class ConjugationOperator(EndomorphicOperator):
class
Realizer
(
EndomorphicOperator
):
def
__init__
(
self
,
domain
):
self
.
_domain
=
domain
self
.
_domain
=
DomainTuple
.
make
(
domain
)
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
def
apply
(
self
,
x
,
mode
):
...
...
test/test_operators/test_adjoint.py
View file @
694d61dc
...
...
@@ -65,6 +65,12 @@ class Consistency_Tests(unittest.TestCase):
dtype
=
dtype
))
ift
.
extra
.
consistency_check
(
op
,
dtype
,
dtype
)
@
expand
(
product
(
_h_spaces
+
_p_spaces
+
_pow_spaces
,
[
np
.
float64
,
np
.
complex128
]))
def
testSumReductionOperator
(
self
,
sp
,
dtype
):
op
=
ift
.
SumReductionOperator
(
sp
)
ift
.
extra
.
consistency_check
(
op
,
dtype
,
dtype
)
@
expand
(
product
([(
ift
.
RGSpace
(
10
,
harmonic
=
True
),
4
,
0
),
(
ift
.
RGSpace
((
24
,
31
),
distances
=
(
0.4
,
2.34
),
harmonic
=
True
),
3
,
0
),
...
...
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