find_nearest#

Functions:

find_nearest(array, values)

Find value(s) in array that are nearest to values.

pyH2A.Utilities.find_nearest.find_nearest(array, values)[source]#

Find value(s) in array that are nearest to values.

Parameters
array: ndarray

Array to be searched. If array has more than one dimension, only the first column is used.

valuesfloat, ndarray or list

Single float, ndarray or list with values for which the nearest entries in array should be found.

Returns
hitslist

List of indices of closest values in array.