simplices = [([0], 1), ([1], 2), ([0,1], 3), ([2], 4), \ ([1,2], 5), ([0,2], 6)] f = Filtration() for vertices, time in simplices: f.append(Simplex(vertices, time)) f.sort(dim_data_cmp) for s in f: print s, s.data # s.data is the time