def filter_empty_irrep(coll):
    """
    A matrix is returned for every irrep, even if the irrep is not present for
    the molecule; these must be filtered out to avoid problems with NumPy
    arrays that have a zero dimension.
    """
    return tuple(m for m in coll if all(m.shape))