Preprocessor.interpolate_box#

Preprocessor.interpolate_box(arr, box, kind='nearest')[source]#

Resample arr within box using kind interpolation.

Parameters:
arrNDArray

The input numpy array.

boxtuple of int

Tuple of integers corresponding to the shape of the output array.

kindstr, optional

Interpolation method used (see scipy.interpolate.interp1d). Default is ‘nearest’.

Returns:
NDArray

Interpolated numpy array.

Raises:
ValueError

If the shape of box does not match arr.ndim