Skip to content

Commit b68f922

Browse files
committed
Fix minor indentation issues
1 parent 0c6b173 commit b68f922

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

sklearn/tests/test_cross_validation.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,18 +1098,16 @@ def test_check_is_partition():
10981098
assert_false(cval._check_is_partition(p, 100))
10991099

11001100
def test_cross_val_predict_sparse_prediction():
1101-
"""Check that cross_val_predict gives the same result for sparse and dense inputs"""
1102-
X, Y = make_multilabel_classification(n_classes=2, n_labels=1,
1103-
allow_unlabeled=False,
1104-
return_indicator=True,
1105-
random_state=1)
1101+
# check that cross_val_predict gives same result for sparse and dense input
1102+
X, y = make_multilabel_classification(n_classes=2, n_labels=1,
1103+
allow_unlabeled=False,
1104+
return_indicator=True,
1105+
random_state=1)
11061106
X_sparse = csr_matrix(X)
1107-
Y_sparse = csr_matrix(Y)
1107+
y_sparse = csr_matrix(y)
11081108
classif = OneVsRestClassifier(SVC(kernel='linear'))
1109-
preds = cval.cross_val_predict(classif, X,
1110-
Y, cv=10)
1111-
preds_sparse = cval.cross_val_predict(classif, X_sparse,
1112-
Y_sparse, cv=10)
1109+
preds = cval.cross_val_predict(classif, X, y, cv=10)
1110+
preds_sparse = cval.cross_val_predict(classif, X_sparse,y_sparse, cv=10)
11131111
preds_sparse = preds_sparse.toarray()
11141112
assert_array_almost_equal(preds_sparse, preds)
11151113

0 commit comments

Comments
 (0)