'Set the :attr:`_boundaries` and :attr:`_values` attributes
based on the input boundaries and values.  Input boundaries
can be *self.boundaries* or the argument *b*.'

def _process_values(self, b=None):

    if (b is None):
        b = self.boundaries
    if (b is not None):
        self._boundaries = np.asarray(b, dtype=float)
        if (self.values is None):
            self._values = (0.5 * (self._boundaries[:(-1)] + self._boundaries[1:]))
            if isinstance(self.norm, colors.NoNorm):
                self._values = (self._values + 1e-05).astype(np.int16)
            return
        self._values = np.array(self.values)
        return
    if (self.values is not None):
        self._values = np.array(self.values)
        if (self.boundaries is None):
            b = np.zeros((len(self.values) + 1), u'd')
            b[1:(-1)] = (0.5 * (self._values[:(-1)] - self._values[1:]))
            b[0] = ((2.0 * b[1]) - b[2])
            b[(-1)] = ((2.0 * b[(-2)]) - b[(-3)])
            self._boundaries = b
            return
        self._boundaries = np.array(self.boundaries)
        return
    if isinstance(self.norm, colors.NoNorm):
        b = ((self._uniform_y((self.cmap.N + 1)) * self.cmap.N) - 0.5)
        v = np.zeros(((len(b) - 1),), dtype=np.int16)
        v = np.arange(self.cmap.N, dtype=np.int16)
        self._boundaries = b
        self._values = v
        return
    elif isinstance(self.norm, colors.BoundaryNorm):
        b = np.array(self.norm.boundaries)
        v = np.zeros(((len(b) - 1),), dtype=float)
        bi = self.norm.boundaries
        v = (0.5 * (bi[:(-1)] + bi[1:]))
        self._boundaries = b
        self._values = v
        return
    else:
        b = self._uniform_y((self.cmap.N + 1))
    self._process_values(b)
