lifecycles.LifeCycle.slice¶
- LifeCycle.slice(start: int, end: int) object¶
slice the LifeCycle to keep only a given interval
- Parameters:
start – the start of the interval
end – the end of the interval
- Returns:
a new LifeCycle object
- Example:
>>> lc = LifeCycle() >>> lc.add_partition([[1,2], [3,4,5]]) >>> lc.add_partition([{5,7}, {6,8}]) >>> lc.add_partition([{5,7}, {1,6,8}]) >>> sliced = lc.slice(0, 1)