get_weights#

natinterp3d.get_weights(queries, keys, parallel=True, num_threads=None)[source]#

Returns the natural interpolation weights (Sibson coordinates) for the query points, given the known data points (keys, data sites).

Parameters:
  • queries (ndarray) – The points for which to compute the interpolation weights.

  • keys (ndarray) – The points at which the function is known (sites)

  • parallel (bool) – Whether to use multithreaded parallel processing.

  • num_threads (Optional[int]) – The number of threads to use for parallel processing. If None, the number of threads will be determined by the number of cores available. Ignored if parallel is False.

Returns:

The interpolation weights for the query points as a sparse matrix.

Return type:

csr_matrix