8000 MNT Avoid using "is" when comparing strings (#12168) · sjtrny/scikit-learn@b915ca6 · GitHub
[go: up one dir, main page]

Skip to content

Commit b915ca6

Browse files
MNT Avoid using "is" when comparing strings (scikit-learn#12168)
1 parent b886da5 commit b915ca6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/model_selection/tests/test_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ def get_expected_predictions(X, y, cv, classes, est, method):
13931393
est.fit(X[train], y[train])
13941394
expected_predictions_ = func(X[test])
13951395
# To avoid 2 dimensional indexing
1396-
if method is 'predict_proba':
1396+
if method == 'predict_proba':
13971397
exp_pred_test = np.zeros((len(test), classes))
13981398
else:
13991399
exp_pred_test = np.full((len(test), classes),

0 commit comments

Comments
 (0)
0