Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
c65e1b06
Commit
c65e1b06
authored
May 11, 2017
by
Reimar H Leike
Browse files
added a consistency test for pundex pindex inversion
parent
388334ea
Pipeline
#12299
failed with stage
in 4 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_spaces/test_power_space.py
View file @
c65e1b06
...
...
@@ -109,6 +109,16 @@ class PowerSpaceInterfaceTest(unittest.TestCase):
p
=
PowerSpace
(
r
)
assert_
(
isinstance
(
getattr
(
p
,
attribute
),
expected_type
))
class
PowerSpaceConsistencyCheck
(
unittest
.
TestCase
):
@
expand
(
CONSTRUCTOR_CONFIGS
)
def
test_pipundexInversion
(
self
,
harmonic_partner
,
distribution_strategy
,
logarithmic
,
nbin
,
binbounds
,
expected
):
#expected will not be used TODO: write expandproduct to use for this
p
=
PowerSpace
(
harmonic_partner
=
harmonic_partner
,
distribution_strategy
=
distribution_strategy
,
logarithmic
=
logarithmic
,
nbin
=
nbin
,
binbounds
=
binbounds
)
assert_equal
(
p
.
pindex
[
p
.
pundex
],
np
.
arange
(
p
.
dim
),
err_msg
=
'pundex is not right-inverse of pindex!'
)
class
PowerSpaceFunctionalityTest
(
unittest
.
TestCase
):
@
expand
(
CONSTRUCTOR_CONFIGS
)
...
...
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