Skip to content

Commit e7a7de3

Browse files
author
Guillaume Lemaitre
committed
Remove nonzero occurence in IHT
1 parent b5ff83f commit e7a7de3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imblearn/under_sampling/instance_hardness_threshold.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _sample(self, X, y):
193193

194194
# If we need to offer support for the indices
195195
if self.return_indices:
196-
idx_under = np.nonzero(mask)[0]
196+
idx_under = np.flatnonzero(mask)
197197
return X_resampled, y_resampled, idx_under
198198
else:
199199
return X_resampled, y_resampled

0 commit comments

Comments
 (0)