def get_index(value, array):
    """Get the index that places a value
    at array[i] < array <= vec[i+1]

    Parameters
    ----------
    value : float
        Value to locate
    array : array
        Array to search

    Returns
    -------
    int
        Index
    """
    if value <= array[0]:
        return 0
    elif value > array[-1]:
        return len(array) - 1

    i = 0
    while value > array[i + 1]:
        i += 1

    return i