Skip to content

Commit 6bf932c

Browse files
author
Yury Malkov
committed
fix python tests
1 parent d18f804 commit 6bf932c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python_bindings/tests/bindings_test_labels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def testRandomSelf(self):
5050
self.assertAlmostEqual(np.mean(labels.reshape(-1) == np.arange(len(data1))),1.0,3)
5151

5252
# Check that the returned element data is correct:
53-
diff_with_gt_labels=np.max(np.abs(data1-items))
53+
diff_with_gt_labels=np.mean(np.abs(data1-items))
5454
self.assertAlmostEqual(diff_with_gt_labels, 0, delta = 1e-4)
5555

5656
# Serializing and deleting the index.
@@ -83,7 +83,7 @@ def testRandomSelf(self):
8383
self.assertAlmostEqual(np.mean(labels.reshape(-1) == np.arange(len(data))),1.0,3)
8484

8585
# Check that the returned element data is correct:
86-
diff_with_gt_labels=np.max(np.abs(data-items))
86+
diff_with_gt_labels=np.mean(np.abs(data-items))
8787
self.assertAlmostEqual(diff_with_gt_labels, 0, delta = 1e-4) # deleting index.
8888

8989
# Checking that all labels are returned correctly:

0 commit comments

Comments
 (0)