binterpolate#
- cbclib.bin.binterpolate(data: numpy.ndarray, coords: numpy.ndarray, num_threads: int = 1)[source]#
Perform bilinear multidimensional interpolation on regular grids. The integer grid starting from
(0, 0, ...)to(data.shape[0] - 1, data.shape[1] - 1, ...)is implied.- Parameters
data (numpy.ndarray) – The data on the regular grid in n dimensions.
coords (numpy.ndarray) – The coordinates to sample the gridded data at.
num_threads (int) – Number of threads used in the calculations.
- Raises
ValueError – If
dataandcoordshave incompatible shapes.- Returns
Interpolated values at input coordinates.
- Return type