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
abb04e8f
Commit
abb04e8f
authored
May 14, 2017
by
Pumpe, Daniel (dpumpe)
Browse files
tests for ComposedOperator
parent
7ecbf48c
Pipeline
#12413
failed with stage
in 4 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_composed_operator.py
View file @
abb04e8f
...
...
@@ -16,7 +16,7 @@ from test.common import expand
class
ComposedOperator_Tests
(
unittest
.
TestCase
):
spaces
=
generate_spaces
()
@
expand
(
product
([
spaces
,
spaces
]))
@
expand
(
product
([
spaces
]
,
[
spaces
]))
def
test_property
(
self
,
space1
,
space2
):
rand1
=
Field
.
from_random
(
'normal'
,
domain
=
space1
)
rand2
=
Field
.
from_random
(
'normal'
,
domain
=
space2
)
...
...
@@ -28,7 +28,7 @@ class ComposedOperator_Tests(unittest.TestCase):
if
op
.
unitary
!=
False
:
raise
ValueError
@
expand
(
product
([
spaces
,
spaces
]))
@
expand
(
product
([
spaces
],[
spaces
]))
def
test_times_adjoint_times
(
self
,
space1
,
space2
):
diag1
=
Field
.
from_random
(
'normal'
,
domain
=
space1
)
diag2
=
Field
.
from_random
(
'normal'
,
domain
=
space2
)
...
...
@@ -44,7 +44,7 @@ class ComposedOperator_Tests(unittest.TestCase):
tt2
=
rand1
.
dot
(
op
.
adjoint_times
(
rand2
))
assert_approx_equal
(
tt1
,
tt2
)
@
expand
(
product
([
spaces
,
spaces
]))
@
expand
(
product
([
spaces
]
,
[
spaces
]))
def
test_times_inverse_times
(
self
,
space1
,
space2
):
diag1
=
Field
.
from_random
(
'normal'
,
domain
=
space1
)
diag2
=
Field
.
from_random
(
'normal'
,
domain
=
space2
)
...
...
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