frites.utils.get_closest_sample#
- frites.utils.get_closest_sample(ref, values, precision=None, return_precision=False)[source]#
Get the sample of closest value in a reference time vector.
- Parameters:
- Returns:
- samplenumpy:array_like
Array of length (n_values,) containing the sample of closest values in the reference vector
- precisionsnumpy:array_like
If return_precision, the vector of precisions of length (n_values,) is also returned