From f66ec40f9f91969d5cf56eb5fa0a25884c87a672 Mon Sep 17 00:00:00 2001 From: Ben Frederickson Date: Wed, 6 Sep 2017 06:12:02 -0700 Subject: [PATCH] Fix docstrings for addDataPoint/addDataPointBatch 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 --- python_bindings/nmslib.cc | 4 ++-- python_bindings/tests/bindings_test.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python_bindings/nmslib.cc b/python_bindings/nmslib.cc index 915d4c3..079ddf9 100644 --- a/python_bindings/nmslib.cc +++ b/python_bindings/nmslib.cc @@ -485,7 +485,7 @@ void exportIndex(py::module * m) { .def("addDataPoint", &IndexWrapper::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" @@ -500,7 +500,7 @@ void exportIndex(py::module * m) { .def("addDataPointBatch", &IndexWrapper::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" diff --git a/python_bindings/tests/bindings_test.py b/python_bindings/tests/bindings_test.py index 202b8c4..4d7c0ca 100644 --- a/python_bindings/tests/bindings_test.py +++ b/python_bindings/tests/bindings_test.py @@ -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)