Beispiel #1
0
 def test_simpson_reciprocal(self):
     """simpson_reciprocal should match 1/D  results"""
     c = array([1,0,2,5,2])
     self.assertFloatEqual(simpson_reciprocal(c), 1./dominance(c))
Beispiel #2
0
 def test_dominance(self):
     """dominance should match hand-calculated values"""
     c = array([1,0,2,5,2])
     self.assertFloatEqual(dominance(c), .34)
     d = array([5])
     self.assertEqual(dominance(d), 1)