def set_minmax_features(cls, _min, _max):
        """Sets the minimum and maximum value for each feature.

        This extracts the number of features from the `_min` and `_max`
        values and ensures that it matches with `nfeatures`. If `nfeatures`
        is None, the `nfeatures` attribute is set to the extracted value.

        Parameters
        ----------
        _min : array_like, shape(`nfeatures`,)
            The minimum value for each feature
        _max : array_like, shape(`nfeatures`,)
            The maximum value for each feature

        Raises
        ------
        ValueError
            If the arrays are not one-dimensional vectors, the shapes of the
            arrays don't match, or the number of features does not agree with
            the attribute `nfeatures`.

        """
        _min = np.asarray(_min, dtype=cls.dtype)
        _max = np.asarray(_max, dtype=cls.dtype)

        dim = _min.size
        if dim == 1:
            _min.shape = (1,)

        dim = _max.size
        if dim == 1:
            _max.shape = (1,)

        if _min.shape[0] != _max.shape[0]:
            raise ValueError("Dimension mismatch: array '_min' is a vector of length %d,"
                             " but '_max' is of length %d" % (_min.shape[0], _max.shape[0]))
        if cls.nfeatures is None:
            cls.nfeatures = _min.shape[0]

        if _min.shape[0] != cls.nfeatures:
            raise ValueError("Arrays '_min' and '_max' must be of length %d." % cls.nfeatures)

        cls.min_features = _min
        cls.max_features = _max