8000 fix for #5725 (makes sure numpy array is not compared to string, whic… · scikit-learn/scikit-learn@998848a · GitHub
[go: up one dir, main page]

Skip to content

Commit 998848a

Browse files
committed
fix for #5725 (makes sure numpy array is not compared to string, which will fail in future versions of numpy)
1 parent cb88239 commit 998848a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/linear_model/randomized_l1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def __init__(self, alpha='aic', scaling=.5, sample_fraction=.75,
330330
def _make_estimator_and_params(self, X, y):
331331
assert self.precompute in (True, False, None, 'auto')
332332
alpha = self.alpha
333-
if alpha in ('aic', 'bic'):
333+
if isinstance(alpha, six.string_types) and alpha in ('aic', 'bic'):
334334
model = LassoLarsIC(precompute=self.precompute,
335335
criterion=self.alpha,
336336
max_iter=self.max_iter,

0 commit comments

Comments
 (0)
0