hora
hora copied to clipboard
Possible alternative to 'add'
The current index add method adds a single vector. Is it possible to add 2D numpy array of vectors and use the array row position as the index.
# proposal for consideration
a = np.array([[1,2,3],[4,5,6]]
index.add(a)
# currently
for i in a:
index.add(sample, i).unwrap();
great advice, I would add it next version as soon as possible!
Thanks that will save one loop through the data. SCIKIT KDtree uses the full arrayby default. https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KDTree.html