Skip to content

Commit

Permalink
MNT Avoid using "is" when comparing strings (#12168)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinhanmin2014 authored and jnothman committed Oct 14, 2018
1 parent 1147156 commit c3f64e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/model_selection/tests/test_validation.py
Expand Up @@ -1393,7 +1393,7 @@ def get_expected_predictions(X, y, cv, classes, est, method):
est.fit(X[train], y[train])
expected_predictions_ = func(X[test])
# To avoid 2 dimensional indexing
if method is 'predict_proba':
if method == 'predict_proba':
exp_pred_test = np.zeros((len(test), classes))
else:
exp_pred_test = np.full((len(test), classes),
Expand Down

0 comments on commit c3f64e6

Please sign in to comment.