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
ift
NIFTy
Commits
1362c613
Commit
1362c613
authored
May 26, 2020
by
Rouven Lemmerz
Browse files
Test interface operator as well
parent
9d09bd71
Pipeline
#75543
passed with stages
in 9 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_operator_tree_optimiser.py
View file @
1362c613
...
...
@@ -39,7 +39,6 @@ class CountingOp(ift.Operator):
def
test_operator_tree_optimiser
():
dom
=
ift
.
RGSpace
(
10
,
harmonic
=
True
)
hdom
=
dom
.
get_default_codomain
()
cop1
=
CountingOp
(
dom
)
op1
=
(
ift
.
UniformOperator
(
dom
,
-
1
,
2
)
@
cop1
).
ducktape
(
'a'
)
cop2
=
CountingOp
(
dom
)
...
...
@@ -58,3 +57,5 @@ def test_operator_tree_optimiser():
op
=
ift
.
operator_tree_optimiser
.
_optimise_operator
(
op
)
assert_allclose
(
op
(
fld
).
val
,
op_orig
(
fld
).
val
,
rtol
=
np
.
finfo
(
np
.
float64
).
eps
)
assert_
(
1
==
(
(
cop4
.
count
-
1
)
*
cop3
.
count
*
cop2
.
count
*
cop1
.
count
))
# test testing
ift
.
optimise_operator
(
op_orig
)
Write
Preview
Supports
Markdown
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