Skip to content

Commit b5ff83f

Browse files
author
Guillaume Lemaitre
committed
Replace nonzero occurence in TL
1 parent 5526fca commit b5ff83f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imblearn/under_sampling/tomek_links.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _sample(self, X, y):
155155
if self.return_indices:
156156
# Return the indices of interest
157157
return (X[np.logical_not(links)], y[np.logical_not(links)],
158-
np.nonzero(np.logical_not(links))[0])
158+
np.flatnonzero(np.logical_not(links)))
159159
else:
160160
# Return data set without majority Tomek links.
161161
return X[np.logical_not(links)], y[np.logical_not(links)]

0 commit comments

Comments
 (0)