예제 #1
0
 def test_removes_broken_values(self):
     shifts = [0.1, 0.1, 0.1, 9001, 0.1, 0.1, 0.1]
     smooth = running_median(shifts, 5)
     self.assertEqual(smooth, [0.1] * 7)
예제 #2
0
파일: main.py 프로젝트: tp7/Sushi
 def test_removes_broken_values(self):
     shifts = [0.1, 0.1, 0.1, 9001, 0.1, 0.1, 0.1]
     smooth = sushi.running_median(shifts, 5)
     self.assertEqual(smooth, [0.1] * 7)
예제 #3
0
 def test_does_no_touch_border_values(self):
     shifts = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
     smooth = running_median(shifts, 5)
     self.assertEqual(shifts, smooth)
예제 #4
0
파일: main.py 프로젝트: tp7/Sushi
 def test_does_no_touch_border_values(self):
     shifts = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
     smooth = sushi.running_median(shifts, 5)
     self.assertEqual(shifts, smooth)