Use InterpolatedUnivariateSpline instead of interp1d to increase speed