Skip to content

Commit 34c1b2e

Browse files
committed
Fix test failed among Python version
1 parent 0e56f76 commit 34c1b2e

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

hbbrain/tests/test_matrix_transformation.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,13 @@ def test_split_matrix_non_sort_max():
4949

5050
def test_split_matrix_sorted_min():
5151
split_max = split_matrix(sim_matrix, asimil_type='min', is_sort=True)
52-
expected_res = np.array([[1, 4, 0.6],
53-
[0, 3, 0.6],
54-
[3, 4, 0.4],
55-
[0, 2, 0.4],
56-
[2, 3, 0.3],
57-
[1, 3, 0.2],
58-
[0, 1, 0.2],
59-
[2, 4, 0.1],
60-
[1, 2, 0.1],
61-
[0, 4, 0.1]])
52+
expected_res = np.array([[1. , 4. , 0.6], [0. , 3. , 0.6], [3. , 4. , 0.4], [0. , 2. , 0.4], [2. , 3. , 0.3], [1. , 3. , 0.2], [0. , 1. , 0.2], [2. , 4. , 0.1], [1. , 2. , 0.1], [0. , 4. , 0.1]])
6253
np.testing.assert_array_equal(split_max, expected_res)
6354

6455

6556
def test_split_matrix_sorted_max():
6657
split_max = split_matrix(sim_matrix, asimil_type='max', is_sort=True)
67-
expected_res = np.array([[1, 4, 0.8],
68-
[3, 4, 0.7],
69-
[2, 3, 0.6],
70-
[0, 3, 0.6],
71-
[0, 2, 0.5],
72-
[2, 4, 0.4],
73-
[1, 3, 0.4],
74-
[1, 2, 0.3],
75-
[0, 1, 0.3],
76-
[0, 4, 0.2]])
58+
expected_res = np.array([[1. , 4. , 0.8], [3. , 4. , 0.7], [2. , 3. , 0.6], [0. , 3. , 0.6], [0. , 2. , 0.5], [2. , 4. , 0.4], [1. , 3. , 0.4], [1. , 2. , 0.3], [0. , 1. , 0.3], [0. , 4. , 0.2]])
7759
np.testing.assert_array_equal(split_max, expected_res)
7860

7961

0 commit comments

Comments
 (0)