def segment_durations(self): """ Returns ------- durations of segments between events """ return loc_util.intervals_from_locations(self.locations + [self.end])
def intervals(self) -> List[float]: return loc_util.intervals_from_locations(self.locations)
def test_intervals_from_locations(locations, expected_intervals): assert loc_util.intervals_from_locations(locations) == expected_intervals