skrf.util.find_nearest_index¶
- skrf.util.find_nearest_index(array, value)[source]¶
Find the nearest index for a value in array.
- Parameters
array (npy.ndarray) – array we are searching for a value in
value (element of the array) – value to search for
- Returns
found_index – the index at which the numerically closest element to value was found at
- Return type
References
taken from http://stackoverflow.com/questions/2566412/find-nearest-value-in-numpy-array