Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -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[:] = 1 | 43 | spec.norm[:] = 1 |