Check permited values of extrapolation.

def _extrapolation(self, extrapolate):
        """Check permited values of extrapolation."""
        modes = ['extrapolate',
                 'raise',
                 'const',
                 'border']
        if extrapolate not in modes:
            msg = 'invalid extrapolation mode {}'.format(extrapolate)
            raise ValueError(msg)

        if extrapolate == 'raise':
            self.bounds_error = True
            self.extrapolate = False
        else:
            self.extrapolate = True
            self.bounds_error = False
        self.extrapolate_mode = extrapolate