From 16ca7da2035460d985be3ee623d49ebf5730ced3 Mon Sep 17 00:00:00 2001 From: ChunjiangZhu Date: Thu, 24 Oct 2019 14:58:52 -0400 Subject: [PATCH] fix bug --- python_bindings/nmslib.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python_bindings/nmslib.cc b/python_bindings/nmslib.cc index 8d51afd..0f783cf 100644 --- a/python_bindings/nmslib.cc +++ b/python_bindings/nmslib.cc @@ -199,12 +199,12 @@ struct IndexWrapper { py::object convertResult_rq(std::set res) { // Create numpy arrays for the output - size_t size = res->Size(); + size_t size = res.Size(); py::array_t ids(size); py::array_t distances(size); - std::set::iterator it = setOfStr.begin(); - while (it != setOfStr.end()) + std::set::iterator it = res.begin(); + while (it != res.end()) { ids.mutable_at(i) = it->id(); //distances.mutable_at(size) = res->at(i)->id();