def ignore_dim_expand(idx):
    """Filters flags for dimension expansion from idx."""
    res = ()
    for i in idx:
        if not i is True and not i is None:
            res += (i,)
    if not res:
        res = (True,)
    return res