Skip to content

Commit a995907

Browse files
author
Guillaume Lemaitre
committed
solve an error
1 parent 9e4152a commit a995907

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imblearn/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def fit(self, X, y):
260260

261261
super(BaseBinarySampler, self).fit(X, y)
262262

263-
if np.unique(y) == 1:
263+
if np.size(np.unique(y)) == 1:
264264
warnings.warn('Hello')
265265

266266
# Check that the target type is binary
@@ -298,7 +298,7 @@ def fit(self, X, y):
298298

299299
super(BaseMulticlassSampler, self).fit(X, y)
300300

301-
if np.unique(y) == 1:
301+
if np.size(np.unique(y)) == 1:
302302
warnings.warn('Hello')
303303

304304
# Check that the target type is either binary or multiclass

0 commit comments

Comments
 (0)