def test_extract_local_extrema_short(test_array_short): returned = wavetable_peaks.detect_local_extrema(test_array_short) expected = {2: 0.9, 3: 0.5, 5: 1.0} assert returned == expected
def test_extract_local_extrema_shortest(test_array_shortest): returned = wavetable_peaks.detect_local_extrema(test_array_shortest) expected = {1: 0.4, 2: 0.3} assert returned == expected
def test_extract_local_extrema(test_array_long): returned = wavetable_peaks.detect_local_extrema(test_array_long) expected = {4: 0.5, 6: 0.3, 10: 0.7, 13: 0.4, 17: 0.8, 19: 0.6, 22: 0.9, 23: 0.8, 25: 0.99, 26: 0.98} assert returned == expected