@@ -105,12 +105,7 @@ def _mv(x):
105
105
C = sp_linalg .LinearOperator (
106
106
(n_samples , n_samples ), matvec = mv , dtype = X .dtype
107
107
)
108
- # FIXME atol
109
- try :
110
- coef , info = sp_linalg .cg (C , y_column , tol = tol , atol = "legacy" )
111
- except TypeError :
112
- # old scipy
113
- coef , info = sp_linalg .cg (C , y_column , tol = tol )
108
+ coef , info = sp_linalg .cg (C , y_column , tol = tol , atol = "legacy" )
114
109
coefs [i ] = X1 .rmatvec (coef )
115
110
else :
116
111
# linear ridge
@@ -119,14 +114,9 @@ def _mv(x):
119
114
C = sp_linalg .LinearOperator (
120
115
(n_features , n_features ), matvec = mv , dtype = X .dtype
121
116
)
122
- # FIXME atol
123
- try :
124
- coefs [i ], info = sp_linalg .cg (
125
- C , y_column , maxiter = max_iter , tol = tol , atol = "legacy"
126
- )
127
- except TypeError :
128
- # old scipy
129
- coefs [i ], info = sp_linalg .cg (C , y_column , maxiter = max_iter , tol = tol )
117
+ coefs [i ], info = sp_linalg .cg (
118
+ C , y_column , maxiter = max_iter , tol = tol , atol = "legacy"
119
+ )
130
120
131
121
if info < 0 :
132
122
raise ValueError ("Failed with error code %d" % info )
0 commit comments