Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #75 #76

Merged
merged 6 commits into from Jan 18, 2023
Merged

Fix issue #75 #76

merged 6 commits into from Jan 18, 2023

Conversation

sebhahn
Copy link
Member

@sebhahn sebhahn commented May 24, 2022

First implementation of handling np.inf in k_nearest_neighbor search:

  • always return k results (i.e. include np.inf in distances)
  • set gpi (with a distance == np.inf) to int32 max value (i.e. 2147483647)

I'm not really happy with setting the gpi to a dummy value. Another option would be returning a masked array for gpi and distance. Or return a boolean array indicating valid entries and leave it to the user how to handle them

main changes: fdc80d2

@sebhahn sebhahn requested a review from wpreimes May 25, 2022 14:12
@wpreimes
Copy link
Member

Thanks. Looks generally good. I don't mind the dummy value. It should be clear from the docs that the GPI and dist should be used together. From my side we can merge this. I think it should not affect any of our other packages.

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.

None yet

3 participants