8000 flake8 issues · scikit-learn/scikit-learn@dc57cf6 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc57cf6

Browse files
committed
flake8 issues
1 parent 5085d2b commit dc57cf6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

sklearn/cluster/bicluster.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ def _scale_normalize(X):
3838
row_diag = np.asarray(1.0 / np.sqrt(X.sum(axis=1)))
3939
if row_diag.shape[0] != 1:
4040
row_diag = row_diag.squeeze()
41-
41+
4242
col_diag = np.asarray(1.0 / np.sqrt(X.sum(axis=0)))
43-
if col_diag.ndim == 1 and col_diag.shape[0]!=1 :
43+
if col_diag.ndim == 1 and col_diag.shape[0] != 1:
4444
col_diag = col_diag.squeeze()
45-
if col_diag.ndim == 2 and col_diag.shape[0]==1 and col_diag.shape[1]!=1 :
45+
if col_diag.ndim == 2 and col_diag.shape[1] != 1:
4646
col_diag = col_diag.squeeze()
47-
47+
4848
row_diag = np.where(np.isnan(row_diag), 0, row_diag)
4949
col_diag = np.where(np.isnan(col_diag), 0, col_diag)
5050

@@ -296,7 +296,7 @@ def _fit(self, X):
296296

297297
z = np.vstack((row_diag[:, np.newaxis] * u,
298298
col_diag[:, np.newaxis] * v))
299-
299+
300300
_, labels = self._k_means(z, self.n_clusters)
301301

302302
n_rows = X.shape[0]
@@ -493,7 +493,7 @@ def _fit(self, X):
493493
for _ in range(n_row_clusters)
494494
for label in range(n_col_clusters))
495495
return self
496-
496+
497497
def _fit_best_piecewise(self, vectors, n_best, n_clusters):
498498
"""Find the ``n_best`` vectors that are best approximated by piecewise
499499
constant vectors.

sklearn/tests/test_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from sklearn.utils.testing import ignore_warnings
2323

2424
import sklearn
25-
from sklearn.cluster.bicluster import BiclusterMixin
2625
from sklearn.decomposition import ProjectedGradientNMF
2726

2827
from sklearn.linear_model.base import LinearClassifierMixin
@@ -220,6 +219,7 @@ def test_transformer_n_iter():
220219
else:
221220
yield check_transformer_n_iter, name, estimator
222221

222+
223223
def test_get_params_invariance():
224224
# Test for estimators that support get_params, that
225225
# get_params(deep=False) is a subset of get_params(deep=True)

0 commit comments

Comments
 (0)
0