I am trying to use the python bindings of the library and run the simple example that is provided (libnabo/python/test.py). However, I cannot, since when the user defines the query point: q = np.array([[1.1, 2.]]) it there is a runtime error:
RuntimeError: Query has less dimensions (1) than requested for cloud (2)
I guess that has something to do with the dimension of the query point. If I transpose the query point I get a correct answer but does this make sense?:
res = nns.knn(q.transpose(), 2, 0, SearchOptionFlags.ALLOW_SELF_MATCH)
res
(array([[1, 0]], dtype=int32), array([[0.01, 2.21]]))
Can you please help advise on how to use the python bindings, or maybe update the example with a working one?
Many thanks in advance.
I am trying to use the python bindings of the library and run the simple example that is provided (libnabo/python/test.py). However, I cannot, since when the user defines the query point: q = np.array([[1.1, 2.]]) it there is a runtime error: RuntimeError: Query has less dimensions (1) than requested for cloud (2)
I guess that has something to do with the dimension of the query point. If I transpose the query point I get a correct answer but does this make sense?:
Can you please help advise on how to use the python bindings, or maybe update the example with a working one? Many thanks in advance.