Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Friedland committed Feb 22, 2019
1 parent 9ec3069 commit e4c0fb6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions python_bindings/tests/bindings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ def testReloadIndex(self):
s = self.bit_vector_str_func(np.ones(512))
original_results = original.knnQuery(s)
reloaded_results = reloaded.knnQuery(s)
original_results = list(zip(list(original_results[0]), list(original_results[1])))
original_results = sorted(original_results, key=lambda x: x[1])
reloaded_results = list(zip(list(reloaded_results[0]), list(reloaded_results[1])))
reloaded_results = sorted(reloaded_results, key=lambda x: x[1])
npt.assert_allclose(original_results, reloaded_results)
npt.assert_allclose(original_results,
reloaded_results)


class HNSWTestCase(unittest.TestCase, DenseIndexTestMixin):
Expand All @@ -174,7 +171,7 @@ def _get_index(self, space='jaccard_sparse'):

class BitHammingTestCase(unittest.TestCase, BitVectorIndexTestMixin):
def _get_index(self, space='bit_hamming'):
return nmslib.init(method='hnsw', space='bit_hamming', data_type=nmslib.DataType.OBJECT_AS_STRING,
return nmslib.init(method='hnsw', space=space, data_type=nmslib.DataType.OBJECT_AS_STRING,
dtype=nmslib.DistType.INT)


Expand Down

0 comments on commit e4c0fb6

Please sign in to comment.