def test_band_minima(self): minidx, minvalue = analytics.band_minima(self.series) self.assertEqual(minidx, 14) self.assertAlmostEqual(minvalue, 0.12584154) minidx, minvalue = analytics.band_minima(self.series, 0, 10) self.assertEqual(minidx, 5) self.assertAlmostEqual(minvalue, 0.1501834946) with self.assertRaises(ValueError): minidx, minvalue = analytics.band_minima(self.series, 6, 1)
def band_minima(self, *args, **kwargs): minidx, minvalue = analytics.band_minima(self, *args, **kwargs) return minidx, minvalue