예제 #1
0
파일: events.py 프로젝트: moshthepitt/mugen
 def segment_durations(self):
     """
     Returns
     -------
     durations of segments between events
     """
     return loc_util.intervals_from_locations(self.locations + [self.end])
예제 #2
0
파일: events.py 프로젝트: moshthepitt/mugen
 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