def test_find_nearest_min(): assert find_nearest(np.array([8, 19, 39, 100, 399]), 1) == 0
def test_find_nearest_max(): assert find_nearest(np.array([8, 19, 39, 100, 399]), 500) == 4
def test_find_nearest(): assert find_nearest(np.array([8, 19, 39, 100, 399]), 20) == 1