def set_nfeatures(cls, n):
        """Set the number of features.

        Parameters
        ----------
        n : int
            The number of features.

        Raises
        ------
        ValueError
            If `n` is not of type integer.

        """
        if not isinstance(n, int):
            raise ValueError("Attribute 'nfeatures' must be of <type 'int'>, got %s" % str(type(n)))
        cls.nfeatures = n