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
b0f8dc8a
Commit
b0f8dc8a
authored
Jul 18, 2018
by
Reimar H Leike
Browse files
now testing DOFProjection
parent
fcbd1ea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_adjoint.py
View file @
b0f8dc8a
...
...
@@ -35,6 +35,22 @@ _pow_spaces = [ift.PowerSpace(ift.RGSpace((17, 38), harmonic=True))]
class
Consistency_Tests
(
unittest
.
TestCase
):
@
expand
(
product
(
_h_spaces
+
_p_RG_spaces
+
_p_spaces
+
_pow_spaces
,
[
np
.
float64
,
np
.
complex128
]))
def
testDOFDistributor
(
self
,
sp
,
dtype
):
if
sp
.
size
<
4
:
return
while
True
:
try
:
dofdex
=
np
.
random
.
choice
(
np
.
arange
(
3
),
size
=
sp
.
shape
)
dofdex
=
ift
.
Field
.
from_global_data
(
sp
,
dofdex
)
op
=
ift
.
DOFDistributor
(
dofdex
)
break
except
ValueError
:
pass
ift
.
extra
.
consistency_check
(
op
,
dtype
,
dtype
)
@
expand
(
product
(
_h_spaces
,
[
np
.
float64
,
np
.
complex128
]))
def
testPPO
(
self
,
sp
,
dtype
):
op
=
ift
.
PowerDistributor
(
target
=
sp
)
...
...
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