@classmethod
def from_data(cls, data, ids=None, feature_names=None, static=True):
    """Converts two arrays or a sparse matrix data and its associated
        id array to Dataset.

        Parameters
        ----------
        data : array or scipy 2-D sparse matrix of shape
               [n_samples, n_features]
        ids : array of shape [n_samples], optional
        feature_names : array of shape [n_features], optional
        """
    if hasattr(data, 'todense'):
        return cls.from_matrix(data, ids, feature_names, static)
    else:
        return cls.from_array(data, ids, feature_names, static)
