Skip to content

Commit 055bc4c

Browse files
committed
pep8
1 parent 13f68c9 commit 055bc4c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sklearn/preprocessing/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ def transform(self, K, y=None, copy=True):
15841584
K += self.K_fit_all_
15851585

15861586
return K
1587-
1587+
15881588
@property
15891589
def _pairwise(self):
15901590
return True

sklearn/preprocessing/tests/test_data.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,11 +1373,12 @@ def test_center_kernel():
13731373
K_pred_centered2 = centerer.transform(K_pred)
13741374
assert_array_almost_equal(K_pred_centered, K_pred_centered2)
13751375

1376+
13761377
def test_cv_pipeline_precomputed():
1377-
"""Cross-validate a regression on four coplanar points with the same
1378+
"""Cross-validate a regression on four coplanar points with the same
13781379
value. Use precomputed kernel to ensure Pipeline with KernelCenterer
13791380
is treated as a _pairwise operation."""
1380-
X = np.array([[3,0,0],[0,3,0],[0,0,3],[1,1,1]])
1381+
X = np.array([[3, 0, 0], [0, 3, 0], [0, 0, 3], [1, 1, 1]])
13811382
y_true = np.ones((4,))
13821383
K = X.dot(X.T)
13831384
kcent = KernelCenterer()
@@ -1389,7 +1390,7 @@ def test_cv_pipeline_precomputed():
13891390
# test cross-validation, score should be almost perfect
13901391
# NB: this test is pretty vacuous -- it's mainly to test integration
13911392
# of Pipeline and KernelCenterer
1392-
y_pred = cross_val_predict(pipeline,K,y_true,cv=4)
1393+
y_pred = cross_val_predict(pipeline, K, y_true, cv=4)
13931394
assert_array_almost_equal(y_true, y_pred)
13941395

13951396

0 commit comments

Comments
 (0)