def _get_sample_select(samples, keep):
    """Returns a vector of True/False to keep samples."""
    k = np.ones_like(samples, dtype=bool)
    if keep is not None:
        k = np.array([s in keep for s in samples], dtype=bool)
        if np.sum(k) == 0:
            logger.warning("No samples matched the keep list")
    return k
Returns a vector of True/False to keep samples.