Esempio n. 1
0
 def test_grouped(self):
     self.assertEqual(list(Average.average(range(8), grouped_window=2)),
                      [0.5, 2.5, 4.5, 6.5])
Esempio n. 2
0
 def test_grouped_moving(self):
     result = Average.average(range(8), grouped_window=2, moving_window=2)
     self.assertEqual(list(result), [1.5, 3.5, 5.5])