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