Skip to content

Commit

Permalink
fix import and argument issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bellet committed Aug 2, 2024
1 parent d9ea833 commit af94810
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metric_learn/sdml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
from sklearn.base import TransformerMixin
from scipy.linalg import pinvh
try:
from sklearn.covariance import _graphical_lasso as graphical_lasso
from sklearn.covariance._graph_lasso import (
_graphical_lasso as graphical_lasso
)
except ImportError:
from sklearn.covariance import graphical_lasso

Expand Down Expand Up @@ -83,7 +85,7 @@ def _fit(self, pairs, y):
msg=self.verbose,
Theta0=theta0, Sigma0=sigma0)
else:
_, M = graphical_lasso(emp_cov, alpha=self.sparsity_param,
_, M, *_ = graphical_lasso(emp_cov, alpha=self.sparsity_param,
verbose=self.verbose,
cov_init=sigma0)
raised_error = None
Expand Down

0 comments on commit af94810

Please sign in to comment.