Given sorted knot positions knot_x and values knot_y, return linearly interpolated values at query_x, holding the first and last knot value flat outside the knot range.
Input
knot_x = [1. 2. 5.]
knot_y = [0.01 0.02 0.035]
query_x = [0.5 1.5 3. 9. ]
Output
[0.01 0.015 0.025 0.035]