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
Open sidebar
Neel Shah
NIFTy
Commits
cf3fc29e
Commit
cf3fc29e
authored
Nov 06, 2019
by
Philipp Arras
Browse files
Test _SlowFieldAdapter
parent
c88eadc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/simple_linear_operators.py
View file @
cf3fc29e
...
...
@@ -187,9 +187,7 @@ class _SlowFieldAdapter(LinearOperator):
self
.
_check_input
(
x
,
mode
)
if
isinstance
(
x
,
MultiField
):
return
x
[
self
.
_name
]
else
:
return
MultiField
.
from_dict
({
self
.
_name
:
x
},
domain
=
self
.
_tgt
(
mode
))
return
MultiField
.
from_dict
({
self
.
_name
:
x
},
domain
=
self
.
_tgt
(
mode
))
def
__repr__
(
self
):
return
'_SlowFieldAdapter'
...
...
test/test_operators/test_adjoint.py
View file @
cf3fc29e
...
...
@@ -319,3 +319,10 @@ def testPartialExtractor(seed):
tgt
=
ift
.
MultiDomain
.
make
(
tgt
)
op
=
ift
.
PartialExtractor
(
dom
,
tgt
)
ift
.
extra
.
consistency_check
(
op
)
@
pmp
(
'seed'
,
[
12
,
3
])
def
testSlowFieldAdapter
(
seed
):
dom
=
{
'a'
:
ift
.
RGSpace
(
1
),
'b'
:
ift
.
RGSpace
(
2
)}
op
=
ift
.
operators
.
simple_linear_operators
.
_SlowFieldAdapter
(
dom
,
'a'
)
ift
.
extra
.
consistency_check
(
op
)
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