Skip to content
Snippets Groups Projects
Commit 2707f02f authored by Reimar H Leike's avatar Reimar H Leike
Browse files

added consistency check for rho<->pindex

parent 6c5a6256
No related branches found
No related tags found
3 merge requests!107Master,!102Test power space,!101Test power space
Pipeline #
......@@ -132,8 +132,15 @@ class PowerSpaceConsistencyCheck(unittest.TestCase):
distribution_strategy=distribution_strategy,
logarithmic=logarithmic, nbin=nbin,
binbounds=binbounds)
assert_equal(p.pindex.flatten()[p.pundex],np.arange(p.dim),err_msg='pundex is not right-inverse of pindex!')
assert_equal(p.pindex.flatten()[p.pundex],np.arange(p.dim),
err_msg='pundex is not right-inverse of pindex!')
@expand(CONSISTENCY_CONFIGS)
def test_rhopindexConsistency(self, harmonic_partner, distribution_strategy,
binbounds, nbin,logarithmic):
assert_equal(p.pindex.flatten().bincount(), p.rho,
err_msg='rho is not equal to pindex degeneracy')
class PowerSpaceFunctionalityTest(unittest.TestCase):
@expand(CONSISTENCY_CONFIGS)
def test_constructor(self, harmonic_partner, distribution_strategy,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment