Skip to content

Commit

Permalink
hotfix for segfault on mkl (#12637)
Browse files Browse the repository at this point in the history
* probably fixing the segfault

* Trigger CircleCI [doc build]

* move isfinite out one level[doc build]

* slightly faster finiteness check
  • Loading branch information
amueller committed Nov 21, 2018
1 parent fd13f47 commit 6ccb5e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sklearn/covariance/graph_lasso_.py
Expand Up @@ -243,6 +243,9 @@ def graphical_lasso(emp_cov, alpha, cov_init=None, mode='cd', tol=1e-4,
coefs = np.dot(sub_covariance, coefs)
covariance_[idx, indices != idx] = coefs
covariance_[indices != idx, idx] = coefs
if not np.isfinite(precision_.sum()):
raise FloatingPointError('The system is too ill-conditioned '
'for this solver')
d_gap = _dual_gap(emp_cov, precision_, alpha)
cost = _objective(emp_cov, precision_, alpha)
if verbose:
Expand Down

0 comments on commit 6ccb5e4

Please sign in to comment.