def test_all_zeroes_one_outlier_not_trimmed(self): inarr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 10.0] trim = 50 self.assertEqual(1.0, qc.trimmed_mean(inarr, trim))
def test_trim_zero(self): inarr = [1.3, 0.7, 4.0] trim = 0 self.assertEqual(2.0, qc.trimmed_mean(inarr, trim))
def test_all_zeroes(self): inarr = [0, 0, 0, 0, 0, 0, 0, 0, 0] trim = 10 self.assertEqual(0.0, qc.trimmed_mean(inarr, trim))