-
Notifications
You must be signed in to change notification settings - Fork 16
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
inconsistent return value of find_k_nearest_gpi
#75
Comments
should we make it consistent? |
yes I think so, however, I'm not sure if a 2d array is the actual intention according to the tests it might be, I'm just going through them |
I think I changed that part of the code some time ago, and I made sure that it works the same way as before. But I also was not sure at that time if it was on purpose or not. I think it can always be 1d. |
no, I think it has to be 2d because it is possible to pass multiple lat/lon coordinates and get k neighbors in return. |
ah ok, makes sense |
I hope changing this behavior is not breaking any code |
@wpreimes how should we handle a) return |
fixed in #76 |
Depending on whether the NN search returns a distance containing a
np.inf
or not decides whether the returned indices and distances are a 1d array (mask applied) or a 2d array (no mask applied, i.e. nonp.inf
entry in the distances)https://github.com/TUW-GEO/pygeogrids/blob/master/src/pygeogrids/grids.py#L468
The text was updated successfully, but these errors were encountered: