uxarray.grid.neighbors.KDTree.query_radius#
- KDTree.query_radius(coords, r=1.0, return_distance=False, in_radians=False, count_only=False, sort_results=False)#
Queries the tree for all neighbors within a radius
r
.- Parameters:
coords (array_like) – coordinate pairs in cartesian (x, y, z) or spherical (lat, lon) to query
r (distance within which neighbors are returned) – r is a single value for the radius of which to query
return_distance (bool, default=False) – Indicates whether distances should be returned
in_radians (bool, optional) – if True, queries assuming coords are inputted in radians, not degrees. Only applies to spherical coordinates
count_only (bool, default=False) – Indicates whether only counts should be returned
sort_results (bool, default=False) – Indicates whether distances should be sorted
- Returns:
d (ndarray of shape (xyz.shape[0], k), dtype=double) – Distance array that keeps the distances of all neighbors within some radius to the entries from xyz in each row
ind (ndarray of shape (xyz.shape[0], k), dtype=INT_DTYPE) – Index array that keeps the indices of all neighbors within some radius to the entries from xyz in each row