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
Neel Shah
NIFTy
Commits
9a8ec556
Commit
9a8ec556
authored
Jun 07, 2021
by
Jakob Knollmüller
Browse files
adjoint tests and fix
parent
77692410
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_adjoint.py
View file @
9a8ec556
...
...
@@ -331,3 +331,23 @@ def testSlowFieldAdapter(seed):
dom
=
{
'a'
:
ift
.
RGSpace
(
1
),
'b'
:
ift
.
RGSpace
(
2
)}
op
=
ift
.
operators
.
simple_linear_operators
.
_SlowFieldAdapter
(
dom
,
'a'
)
ift
.
extra
.
check_linear_operator
(
op
)
@
pmp
(
'seed'
,
[
12
,
3
])
def
testDiagonalExtractor
(
seed
):
N
=
42
square_space
=
ift
.
RGSpace
([
N
,
N
])
op
=
ift
.
library
.
variational_models
.
DiagonalSelector
(
square_space
)
ift
.
extra
.
check_linear_operator
(
op
)
@
pmp
(
'seed'
,
[
12
,
3
])
def
testLowerTriangularInserter
(
seed
):
N
=
42
square_space
=
ift
.
RGSpace
([
N
,
N
])
op
=
ift
.
library
.
variational_models
.
LowerTriangularInserter
(
square_space
)
ift
.
extra
.
check_linear_operator
(
op
)
@
pmp
(
'seed'
,
[
12
,
3
])
def
test_Multifield2Vector
(
seed
):
dom
=
{
'a'
:
ift
.
RGSpace
(
1
),
'b'
:
ift
.
RGSpace
(
2
)}
op
=
ift
.
Multifield2Vector
(
dom
)
ift
.
extra
.
check_linear_operator
(
op
)
\ No newline at end of file
test/test_operators/test_lower_triangular_inserter.py
View file @
9a8ec556
...
...
@@ -33,8 +33,6 @@ def test_lower_triangular_inserter():
myField
=
ift
.
from_random
(
flat_space
)
myMatrix
=
myInserter
(
myField
)
assert_allclose
(
np_selected
,
selected
)
upper_i
=
[]
upper_j
=
[]
for
i
in
range
(
0
,
N
):
...
...
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