def shrink_matrix(x):
    while True:
        if len([x for x in m[0] if x is None]) == x.cols:
            x.pop()
            x = x.tr()
            continue
    return x
Tests:
dataset/ETHPy150Open eBay/bayesian-belief-networks/bayesian/utils.py/shrink_matrix--crossover with--dataset/ETHPy150Open typesupply/woffTools/Lib/woffTools/tools/validate.py/_testTableDataDecompression