pyinterp.RTree4DFloat64.query

pyinterp.RTree4DFloat64.query#

RTree4DFloat64.query(self, coordinates: numpy.ndarray[dtype=float64, shape=(*, *), writable=False], config: pyinterp.core.config.rtree.Query | None = None) tuple[numpy.ndarray[dtype=float64, shape=(*, *), order='F'], numpy.ndarray[dtype=float64, shape=(*, *), order='F'], numpy.ndarray[dtype=float64, shape=(*, *), order='F']]#

Query k-nearest neighbours for many points.

Parameters:
  • coordinates – Query coordinates of shape (n, 4).

  • config – Optional pyinterp.core.config.rtree.Query instance (k, radius, num_threads). Defaults to a fresh Query() with k = 8 and no radius limit.

Returns:

Tuple (distances, values, sigma2) of shape (n, k). Cells beyond the actual neighbour count are filled with NaN.