@@ -23,7 +23,7 @@ def testRandomSelf(self):
23
23
# M - is tightly connected with internal dimensionality of the data
24
24
# stronlgy affects the memory consumption
25
25
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 )
27
27
28
28
# Controlling the recall by setting ef:
29
29
# higher ef leads to better accuracy, but slower search
@@ -48,7 +48,7 @@ def testRandomSelf(self):
48
48
49
49
# Check that the returned element data is correct:
50
50
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 )
52
52
53
53
# Serializing and deleting the index.
54
54
# We need the part to check that serialization is working properly.
@@ -79,7 +79,7 @@ def testRandomSelf(self):
79
79
80
80
# Check that the returned element data is correct:
81
81
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 )
83
83
84
84
# Checking that all labels are returned correcly:
85
85
sorted_labels = sorted (p .get_ids_list ())
@@ -89,4 +89,4 @@ def testRandomSelf(self):
89
89
90
90
91
91
if __name__ == "__main__" :
92
- unittest .main ()
92
+ unittest .main ()
0 commit comments