'Build the f_ interp1d function.'

def _build_f(self, X, y):

    if (self.out_of_bounds not in ['raise', 'nan', 'clip']):
        raise ValueError("The    argument    ``out_of_bounds``    must    be    in    'nan',    'clip',    'raise';    got    {0}".format(self.out_of_bounds))
    bounds_error = (self.out_of_bounds == 'raise')
    if (len(y) == 1):
        self.f_ = (lambda x: y.repeat(x.shape))
    else:
        self.f_ = interpolate.interp1d(X, y, kind='linear', bounds_error=bounds_error)
