Sets up y for the histogram and checks to
        ensure that ``y`` is of the correct data type.
        Fit calls draw.

        Parameters
        ----------
        y : an array of one dimension or a pandas Series

        kwargs : dict
            keyword arguments passed to scikit-learn API.

def fit(self, y, **kwargs):
        """
        Sets up y for the histogram and checks to
        ensure that ``y`` is of the correct data type.
        Fit calls draw.

        Parameters
        ----------
        y : an array of one dimension or a pandas Series

        kwargs : dict
            keyword arguments passed to scikit-learn API.

        """

        #throw an error if y has more than 1 column
        if y.ndim > 1:
            raise YellowbrickValueError("y needs to be an array or Series with one dimension") 

        # Handle the target name if it is None.
        if self.target is None:
            self.target = 'Frequency'

        self.draw(y)
        return self