示例#1
0
    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)
示例#2
0
    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)
示例#3
0
 def band_minima(self, *args, **kwargs):
     minidx, minvalue = analytics.band_minima(self, *args, **kwargs)
     return minidx, minvalue
示例#4
0
 def band_minima(self, *args, **kwargs):
     minidx, minvalue = analytics.band_minima(self, *args, **kwargs)
     return minidx, minvalue