From d9cf5dc81ebe264f6b3837125a746bac6d053fa8 Mon Sep 17 00:00:00 2001 From: ChunjiangZhu Date: Thu, 24 Oct 2019 15:39:40 -0400 Subject: [PATCH] fix bug --- python_bindings/nmslib.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_bindings/nmslib.cc b/python_bindings/nmslib.cc index f848874..fa09606 100644 --- a/python_bindings/nmslib.cc +++ b/python_bindings/nmslib.cc @@ -150,6 +150,7 @@ struct IndexWrapper { py::gil_scoped_release l; index->Search(&rq, -1); } + rq.Print(); return convertResult_rq(rq.ResultSet()); } @@ -208,7 +209,7 @@ struct IndexWrapper { while (it != res.end()) { ids.mutable_at(i) = (*it)->id(); - //distances.mutable_at(size) = res->at(i)->id(); + distances.mutable_at(i) = 0.0; it++; i++; } return py::make_tuple(ids, distances);