Skip to content

Conversation

Scikud
Copy link

@Scikud Scikud commented Oct 13, 2023

Often it's useful to return lists instead of numpy arrays. This is especially useful when using filtering if k > num of items returned after filtering. There may also be instances where you'd like to return noncontigous 2d arrays. This PR adds a new binding that will return a List of Lists instead of a numpy array.

This pr should fix contigious 2D array.

cc @yurymalkov

@yurymalkov yurymalkov changed the base branch from master to develop October 16, 2023 02:45
@dyashuni
Copy link
Contributor

@Scikud Thank you for the PR!
Could you please modify the existing function knnQuery_return_numpy instead of creating a new one?
You can take a look at the getData function as an example. It has a return_type parameter that can be set to either numpy or list. Then we will need to rename the knnQuery_return_numpy function to something like knnQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot return the results in a contigious 2D array. Probably ef or M is too small
2 participants