8000 MNT Use `np.nonzero()` instead of `np.where` in feature selectors (#3… · scikit-learn/scikit-learn@d2dbcff · GitHub
[go: up one dir, main page]

Skip to content

Commit d2dbcff

Browse files
authored
MNT Use np.nonzero() instead of np.where in feature selectors (#30519)
1 parent 99eeaf4 commit d2dbcff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/feature_selection/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_support(self, indices=False):
7070
values are indices into the input feature vector.
7171
"""
7272
mask = self._get_support_mask()
73-
return mask if not indices else np.where(mask)[0]
73+
return mask if not indices else np.nonzero(mask)[0]
7474

7575
@abstractmethod
7676
def _get_support_mask(self):

0 commit comments

Comments
 (0)
0