@@ -156,21 +156,6 @@ def _cube(x, fun_args):
156
156
157
157
@validate_params (
158
158
{
159
- "X" : ["array-like" ],
160
- "n_components" : [Interval (Integral , 1 , None , closed = "left" ), None ],
161
- "algorithm" : [StrOptions ({"parallel" , "deflation" })],
162
- "whiten" : [
163
- Hidden (StrOptions ({"warn" })),
164
- StrOptions ({"arbitrary-variance" , "unit-variance" }),
165
- "boolean" ,
166
- ],
167
- "fun" : [StrOptions ({"logcosh" , "exp" , "cube" }), callable ],
168
- "fun_args" : [dict , None ],
169
- "max_iter" : [Interval (Integral , 1 , None , closed = "left" )],
170
- "tol" : [Interval (Real , 0.0 , None , closed = "left" )],
171
- "w_init" : ["array-like" , None ],
172
- "whiten_solver" : [StrOptions ({"eigh" , "svd" })],
173
- "random_state" : ["random_state" ],
174
159
"return_X_mean" : ["boolean" ],
175
160
"compute_sources" : ["boolean" ],
176
161
"return_n_iter" : ["boolean" ],
@@ -341,7 +326,11 @@ def my_g(x):
341
326
whiten_solver = whiten_solver ,
342
327
random_state = random_state ,
343
328
)
344
- S = est ._fit_transform (X , compute_sources = compute_sources )
329
+ if compute_sources :
330
+ S = est .fit_transform (X )
331
+ else :
332
+ est .fit (X )
333
+ S = None
345
334
346
335
if est ._whiten in ["unit-variance" , "arbitrary-variance" ]:
347
336
K = est .whitening_
0 commit comments