Python Linear Interpolation 1d