Skip to content

Commit 1a9a1b8

Browse files
author
Guillaume Lemaitre
committed
PEP8
1 parent 5685f15 commit 1a9a1b8

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

imblearn/ensemble/balance_cascade.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ def _sample(self, X, y):
195195
# from the majority class depending of the false classification
196196
# rate of the previous iteration
197197
idx_sel_from_maj = random_state.choice(np.nonzero(b_sel_N)[0],
198-
size=num_samples,
199-
replace=False)
198+
size=num_samples,
199+
replace=False)
200200
idx_sel_from_maj = np.concatenate((idx_mis_class,
201201
idx_sel_from_maj),
202202
axis=0).astype(int)

imblearn/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self, steps):
7070
for t in transforms:
7171
if (not (hasattr(t, "fit") or hasattr(t, "fit_transform") or
7272
hasattr(t, "fit_sample")) or
73-
not (hasattr(t, "transform") or hasattr(t, "sample"))):
73+
not (hasattr(t, "transform") or hasattr(t, "sample"))):
7474
raise TypeError("All intermediate steps of the chain should "
7575
"be transforms and implement fit and transform"
7676
" '%s' (type %s) doesn't)" % (t, type(t)))

imblearn/tests/test_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ def test_pipeline_sample_transform():
424424

425425
pipeline.fit(X, y).transform(X)
426426

427+
427428
def test_pipeline_methods_anova_rus():
428429
# Test the various methods of the pipeline (anova).
429430
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],

imblearn/under_sampling/tests/test_instance_hardness_threshold.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def test_iht_wrong_estimator():
6464
random_state=RND_SEED)
6565
assert_raises(NotImplementedError, iht.fit_sample, X, Y)
6666

67+
6768
def test_iht_init():
6869
"""Test the initialisation of the object"""
6970

@@ -233,7 +234,6 @@ def test_iht_fit_sample_adaboost():
233234
assert_array_equal(y_resampled, y_gt)
234235

235236

236-
237237
def test_iht_fit_sample_gradient_boosting():
238238
"""Test the fit sample routine with gradient boosting"""
239239

imblearn/under_sampling/tests/test_nearmiss_3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def test_nearmiss_wrong_version():
6060
nm3 = NearMiss(version=version, random_state=RND_SEED)
6161
assert_raises(ValueError, nm3.fit_sample, X, Y)
6262

63+
6364
def test_nearmiss_init():
6465
"""Test the initialisation of the object"""
6566

0 commit comments

Comments
 (0)