uxarray.grid.neighbors.KDTree.query_radius#

KDTree.query_radius(xyz, r=1.0, return_distance=True, count_only=False, sort_results=False)#

Queries the tree for all neighbors within a radius r.

Parameters:
  • xyz (array_like) – coordinate pairs in cartesian (x, y, z) 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

  • 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