8000 hotfix for segfault on mkl (#12637) · scikit-learn/scikit-learn@6ccb5e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ccb5e4

Browse files
committed
hotfix for segfault on mkl (#12637)
* probably fixing the segfault * Trigger CircleCI [doc build] * move isfinite out one level[doc build] * slightly faster finiteness check
1 parent fd13f47 commit 6ccb5e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sklearn/covariance/graph_lasso_.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ def graphical_lasso(emp_cov, alpha, cov_init=None, mode='cd', tol=1e-4,
243243
coefs = np.dot(sub_covariance, coefs)
244244
covariance_[idx, indices != idx] = coefs
245245
covariance_[indices != idx, idx] = coefs
246+
if not np.isfinite(precision_.sum()):
247+
raise FloatingPointError('The system is too ill-conditioned '
248+
'for this solver')
246249
d_gap = _dual_gap(emp_cov, precision_, alpha)
247250
cost = _objective(emp_cov, precision_, alpha)
248251
if verbose:

0 commit comments

Comments
 (0)
0