Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fd72d1b3 authored by hhakim's avatar hhakim
Browse files

Fix python unit tests for RCG and density next to the fix c586c85b.

parent 5fead365
Branches
Tags 3.12.0
No related merge requests found
......@@ -124,12 +124,14 @@ class TestFaustPy(unittest.TestCase):
def testDensity(self):
print("testDensity()")
ref_density = self.faust_nnz()/self.F.get_nb_cols()/self.F.get_nb_rows()
ref_density = \
float(self.faust_nnz())/float(self.F.get_nb_cols()*self.F.get_nb_rows())
self.assertAlmostEqual(ref_density, self.F.density(), delta=.001)
def testRcg(self):
print("testRcg()")
ref_rcg = self.F.get_nb_rows()*self.F.get_nb_cols()/self.faust_nnz()
ref_rcg = \
float(self.F.get_nb_rows()*self.F.get_nb_cols())/float(self.faust_nnz())
self.assertAlmostEqual(ref_rcg, self.F.RCG(), delta=.001)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment