Skip to content

Commit

Permalink
Fix docstrings for addDataPoint/addDataPointBatch
Browse files Browse the repository at this point in the history
Docstrings for addDataPoint/addDataPointBatch were cut and
paste incorrectly. Fix.

Also fix flake8 warning that is in the master branch, and is causing
this build to be marked as failing: https://github.com/searchivarius/nmslib/pull/234
  • Loading branch information
Ben Frederickson committed Sep 6, 2017
1 parent 0fc0112 commit f66ec40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python_bindings/nmslib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void exportIndex(py::module * m) {
.def("addDataPoint", &IndexWrapper<dist_t>::addDataPoint,
py::arg("id"),
py::arg("data"),
"Saves the index to disk\n\n"
"Adds a single data point to the index\n\n"
"Parameters\n"
"----------\n"
"id: int\n"
Expand All @@ -500,7 +500,7 @@ void exportIndex(py::module * m) {
.def("addDataPointBatch", &IndexWrapper<dist_t>::addDataPointBatch,
py::arg("data"),
py::arg("ids") = py::none(),
"Saves the index to disk\n\n"
"Adds several data points to the index\n\n"
"Parameters\n"
"----------\n"
"data: object\n"
Expand Down
1 change: 0 additions & 1 deletion python_bindings/tests/bindings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def testKnnQueryBatch(self):
for query, (ids, distances) in zip(queries, results):
self.assertTrue(get_hitrate(get_exact_cosine(query, data), ids) >= 5)


def testReloadIndex(self):
np.random.seed(23)
data = np.random.randn(1000, 10).astype(np.float32)
Expand Down

0 comments on commit f66ec40

Please sign in to comment.