Python3 warnings
This commit is contained in:
parent
ede701202f
commit
c6c006eb22
@ -140,7 +140,7 @@ def rebin_data(time_data, num_time_per_bin):
|
|||||||
|
|
||||||
return np.array(
|
return np.array(
|
||||||
[time_data[:, num_time_per_bin * i:num_time_per_bin * (i+1)].mean(axis=1)
|
[time_data[:, num_time_per_bin * i:num_time_per_bin * (i+1)].mean(axis=1)
|
||||||
for i in range(n_max)]).T
|
for i in range(int(n_max))]).T
|
||||||
|
|
||||||
|
|
||||||
def get_prob_dist(transition_matrix, lag_indices, unit_indices):
|
def get_prob_dist(transition_matrix, lag_indices, unit_indices):
|
||||||
|
@ -66,7 +66,7 @@ class SegmentationTest(unittest.TestCase):
|
|||||||
test_array = np.array([1.2, np.nan, 3.2, np.nan, np.nan])
|
test_array = np.array([1.2, np.nan, 3.2, np.nan, np.nan])
|
||||||
result = replace_nan_with_mean(test_array, means=None)[0]
|
result = replace_nan_with_mean(test_array, means=None)[0]
|
||||||
expectation = np.array([1.2, 2.2, 3.2, 2.2, 2.2], dtype=float)
|
expectation = np.array([1.2, 2.2, 3.2, 2.2, 2.2], dtype=float)
|
||||||
self.assertItemsEqual(result, expectation)
|
self.assertEqual(sorted(result), sorted(expectation))
|
||||||
|
|
||||||
def test_create_and_predict_segment(self):
|
def test_create_and_predict_segment(self):
|
||||||
"""test segmentation.test_create_and_predict"""
|
"""test segmentation.test_create_and_predict"""
|
||||||
|
Loading…
Reference in New Issue
Block a user