def test_nearest_intersection_idx(): """Test nearest index to intersection functionality.""" x = np.linspace(5, 30, 17) y1 = 3 * x**2 y2 = 100 * x - 650 truth = np.array([2, 12]) assert_array_equal(truth, nearest_intersection_idx(y1, y2))