Skip to content

Commit bb2a1d1

Browse files
author
Yury Malkov
committed
fix bindings test
1 parent 79c4ba4 commit bb2a1d1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python_bindings/tests/bindings_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def testRandomSelf(self):
2323
# M - is tightly connected with internal dimensionality of the data
2424
# stronlgy affects the memory consumption
2525

26-
p.init_index(max_elements=num_elements, ef_construction=100, M=16)
26+
p.init_index(max_elements = num_elements, ef_construction = 100, M = 16)
2727

2828
# Controlling the recall by setting ef:
2929
# higher ef leads to better accuracy, but slower search

python_bindings/tests/bindings_test_labels.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def testRandomSelf(self):
2323
# M - is tightly connected with internal dimensionality of the data
2424
# stronlgy affects the memory consumption
2525

26-
p.init_index(max_elements=num_elements, ef_construction=100, M=16)
26+
p.init_index(max_elements = num_elements, ef_construction = 100, M = 16)
2727

2828
# Controlling the recall by setting ef:
2929
# higher ef leads to better accuracy, but slower search
@@ -48,7 +48,7 @@ def testRandomSelf(self):
4848

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

5353
# Serializing and deleting the index.
5454
# We need the part to check that serialization is working properly.
@@ -79,7 +79,7 @@ def testRandomSelf(self):
7979

8080
# Check that the returned element data is correct:
8181
diff_with_gt_labels=np.max(np.abs(data-items))
82-
self.assertAlmostEqual(diff_with_gt_labels,0,1e-4)
82+
self.assertAlmostEqual(diff_with_gt_labels, 0, delta = 1e-4)
8383

8484
# Checking that all labels are returned correcly:
8585
sorted_labels=sorted(p.get_ids_list())
@@ -89,4 +89,4 @@ def testRandomSelf(self):
8989

9090

9191
if __name__ == "__main__":
92-
unittest.main()
92+
unittest.main()

0 commit comments

Comments
 (0)