def validate_contingency_table(the_table):
    """Checks tables for columns or rows with all zeros and deletes.

    Args:
        the_table: input contingency table

    Returns:
        updated table with columns/rows corresponding to all zeros
    """
    mask = list()
    for ndx in range(2):
        sums = the_table.sum(axis=ndx)
        mask.append(sums != 0)
    return the_table[mask[1]][:, mask[0]]