예제 #1
0
 def test_ts_features_single_feature(self):
     # test that only one feature can be calculated
     d = ts_features(np.random.random(10), features=['Shannon entropy'])
     self.assertEqual(len(d), 1)
     return
예제 #2
0
 def test_ts_features_numbers(self):
     # test that all the features are calculated
     d = ts_features(np.random.random(100))
     self.assertEqual(len(d), 21)
     return
예제 #3
0
 def test_stats_list(self):
     d = ts_features(np.random.random(10).tolist())
     self.assertGreater(len(d), 1)
     return
예제 #4
0
 def test_stats_slice(self):
     d = ts_features(np.random.random(100), st=10, en=50)
     self.assertEqual(d['Counts'], 40)
     return
예제 #5
0
 def test_stats_pd(self):
     d = ts_features(pd.Series(np.random.random(10)))
     self.assertGreater(len(d), 1)
     return