def _get_mask(X, value_to_mask):
    if value_to_mask == "NaN" or np.isnan(value_to_mask):
        return np.isnan(X)
    else:
        return X == value_to_mask
Compute the boolean mask X == missing_values.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/preprocessing/imputation.py/_get_mask