'Fits the GraphLasso model to X.
Parameters
X : ndarray, shape (n_samples, n_features)
Data from which to compute the covariance estimate
y : (ignored)'

def fit(self, X, y=None):

    X = check_array(X, ensure_min_features=2, ensure_min_samples=2, estimator=self)
    if self.assume_centered:
        self.location_ = np.zeros(X.shape[1])
    else:
        self.location_ = X.mean(0)
    emp_cov = empirical_covariance(X, assume_centered=self.assume_centered)
    (self.covariance_, self.precision_, self.n_iter_) = graph_lasso(emp_cov, alpha=self.alpha, mode=self.mode, tol=self.tol, enet_tol=self.enet_tol, max_iter=self.max_iter, verbose=self.verbose, return_n_iter=True)
    return self
