History

[py] fb.set_triangle_bands does not warn for freqs <= samplerate/2

Paul Brossier committed 8 years ago

Commit 75f9fff1 parent 8354cb81 file · +2 −4Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/tests/test_filterbank_mel.py+2−4
@@ -29,8 +29,7 @@ class aubio_filterbank_mel_test_case(TestCase): · 28 unmodified lines
29 f = filterbank(9, 1024)29 f = filterbank(9, 1024)
30 freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000]30 freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000]
31 freqs = np.array(freq_list, dtype = float_type)31 freqs = np.array(freq_list, dtype = float_type)
32 with assert_warns(UserWarning):32 f.set_triangle_bands(freqs, 48000)
33 f.set_triangle_bands(freqs, 48000)
34 assert_equal ( f(cvec(1024)), 0)33 assert_equal ( f(cvec(1024)), 0)
35 self.assertIsInstance(f.get_coeffs(), np.ndarray)34 self.assertIsInstance(f.get_coeffs(), np.ndarray)
36 35
@@ -38,8 +37,7 @@ class aubio_filterbank_mel_test_case(TestCase): · 1 unmodified line
38 f = filterbank(9, 1024)37 f = filterbank(9, 1024)
39 freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000]38 freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000]
40 freqs = np.array(freq_list, dtype = float_type)39 freqs = np.array(freq_list, dtype = float_type)
41 with assert_warns(UserWarning):40 f.set_triangle_bands(freqs, 48000)
42 f.set_triangle_bands(freqs, 48000)
43 self.assertIsInstance(f.get_coeffs(), np.ndarray)41 self.assertIsInstance(f.get_coeffs(), np.ndarray)
44 spec = cvec(1024)42 spec = cvec(1024)
45 spec.norm[:] = 143 spec.norm[:] = 1

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t