

def _get_support_mask(self):
    check_is_fitted(self, 'scores_')
    if (self.k == 'all'):
        return np.ones(self.scores_.shape, dtype=bool)
    elif (self.k == 0):
        return np.zeros(self.scores_.shape, dtype=bool)
    else:
        scores = _clean_nans(self.scores_)
        mask = np.zeros(scores.shape, dtype=bool)
        mask[np.argsort(scores, kind='mergesort')[(- self.k):]] = 1
        return mask

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/feature_selection/univariate_selection.py SelectKBest._get_support_mask/original