add the feature of constant extrapolation to 1d spline.