oasislmf.pytools.gul.utils¶
This file contains general-purpose utilities used in gulpy.
Functions¶
|
Assuming array is a sorted array (increasing order), find the bin |
Module Contents¶
- oasislmf.pytools.gul.utils.binary_search(value, array, n)[source]¶
Assuming array is a sorted array (increasing order), find the bin where where array gets larger than value.
- Parameters:
- Returns:
- the first index of array where array is larger than value.
Returns -1 if this condition never occurs.
- Return type: