lifecycles.LifeCycle.to_dict¶
- LifeCycle.to_dict() dict¶
convert the LifeCycle to a dictionary
- Returns:
a dictionary representation of the LifeCycle
- Example:
>>> lc = LifeCycle() >>> lc.add_partition([[1,2], [3,4,5]]) >>> lc.add_partition([[1,2,3], [4,5]]) >>> lc.to_dict() >>> # {'dtype': 'int', 'named_sets': {'0_0': {1, 2}, '0_1': {3, 4, 5}, '1_0': {1, 2, 3}, '1_1': {4, 5}}}