Skip to content

Commit af94810

Browse files
committed
fix import and argument issue
1 parent d9ea833 commit af94810

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

metric_learn/sdml.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
from sklearn.base import TransformerMixin
88
from scipy.linalg import pinvh
99
try:
10-
from sklearn.covariance import _graphical_lasso as graphical_lasso
10+
from sklearn.covariance._graph_lasso import (
11+
_graphical_lasso as graphical_lasso
12+
)
1113
except ImportError:
1214
from sklearn.covariance import graphical_lasso
1315

@@ -83,7 +85,7 @@ def _fit(self, pairs, y):
8385
msg=self.verbose,
8486
Theta0=theta0, Sigma0=sigma0)
8587
else:
86-
_, M = graphical_lasso(emp_cov, alpha=self.sparsity_param,
88+
_, M, *_ = graphical_lasso(emp_cov, alpha=self.sparsity_param,
8789
verbose=self.verbose,
8890
cov_init=sigma0)
8991
raised_error = None

0 commit comments

Comments
 (0)