def sanitize_index_lists(ind):
    if not isinstance(ind, (list, np.ndarray)):
        return ind
    if isinstance(ind, np.ndarray):
        ind = ind.tolist()
    if isinstance(ind, list) and ind and isinstance(ind[0], bool):
        ind = [a for a, b in enumerate(ind) if b]
    return ind
Handle lists/arrays of integers/bools as indexes
dataset/ETHPy150Open blaze/blaze/blaze/expr/expressions.py/sanitize_index_lists