@@ -601,8 +601,7 @@ def fit(self, X, y):
601601 Fitted estimator.
602602 """
603603 if self .weights is None :
604- warnings .warn (
605- 'Weights are not provided, fitting with Lasso penalty' )
604+ warnings .warn ('Weights are not provided, fitting with Lasso penalty' )
606605 penalty = L1 (self .alpha , self .positive )
607606 else :
608607 penalty = WeightedL1 (self .alpha , self .weights , self .positive )
@@ -735,8 +734,7 @@ def path(self, X, y, alphas, coef_init=None, return_n_iter=True, **params):
735734 The number of iterations along the path. If return_n_iter is set to
736735 ``True``.
737736 """
738- penalty = compiled_clone (L1_plus_L2 (
739- self .alpha , self .l1_ratio , self .positive ))
737+ penalty = compiled_clone (L1_plus_L2 (self .alpha , self .l1_ratio , self .positive ))
740738 datafit = compiled_clone (Quadratic (), to_float32 = X .dtype == np .float32 )
741739 solver = AndersonCD (
742740 self .max_iter , self .max_epochs , self .p0 , tol = self .tol ,
@@ -1324,8 +1322,7 @@ def fit(self, X, y):
13241322 f"two columns. Got one column.\n Assuming that `y` "
13251323 "is the vector of times and there is no censoring."
13261324 )
1327- y = np .column_stack ((y , np .ones_like (y ))).astype (
1328- X .dtype , order = "F" )
1325+ y = np .column_stack ((y , np .ones_like (y ))).astype (X .dtype , order = "F" )
13291326 elif y .shape [1 ] > 2 :
13301327 raise ValueError (
13311328 f"{ repr (self )} requires the vector of response `y` to have "
@@ -1543,8 +1540,7 @@ def path(self, X, Y, alphas, coef_init=None, return_n_iter=False, **params):
15431540 The number of iterations along the path. If return_n_iter is set to
15441541 ``True``.
15451542 """
1546- datafit = compiled_clone (QuadraticMultiTask (),
1547- to_float32 = X .dtype == np .float32 )
1543+ datafit = compiled_clone (QuadraticMultiTask (), to_float32 = X .dtype == np .float32 )
15481544 penalty = compiled_clone (L2_1 (self .alpha ))
15491545 solver = MultiTaskBCD (
15501546 self .max_iter , self .max_epochs , self .p0 , tol = self .tol ,
0 commit comments