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

other.kdTree.find_nearest_index in calc_lut returning no result with max_dist defined #73

Closed
sebhahn opened this issue Aug 10, 2021 · 1 comment

Comments

@sebhahn
Copy link
Member

sebhahn commented Aug 10, 2021

other.kdTree.find_nearest_index in calc_lut returning no result with max_dist defined, results are returned without defining max_dist.

@sebhahn
Copy link
Member Author

sebhahn commented Aug 10, 2021

The problem is this line here: https://github.com/TUW-GEO/pygeogrids/blob/master/src/pygeogrids/nearest_neighbor.py#L214

np.all tests whether all array elements along a given axis evaluate to True.

The correct test would be: np.all(np.isfinite(d) == False)

sebhahn added a commit that referenced this issue Aug 10, 2021
@sebhahn sebhahn mentioned this issue Aug 10, 2021
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

No branches or pull requests

1 participant