def test_info_trim2(): """ """ d1 = Distribution(['000', '001', '110', '111', '222', '333'], [1/8]*4+[1/4]*2) d2 = Distribution(['000', '111', '222', '332'], [1/4]*4) d3 = info_trim(d1) assert d3.is_approx_equal(d2)