Interp1d python. Simply set fill_value='extrapolate' in the call.

Interp1d python. interp1d (with kind='linear' of course).