History

[tests] set_triangle_bands should when list starts with 0 (see #206)

Paul Brossier committed 8 years ago

Commit 98c712e1 parent bc1ed631 file · +9 −0Browse files

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

Unified · Split

python/tests/test_filterbank_mel.py+9−0
@@ -47,6 +47,15 @@ class aubio_filterbank_mel_test_case(TestCase): · 46 unmodified lines
47 [ 0.02070313, 0.02138672, 0.02127604, 0.02135417,47 [ 0.02070313, 0.02138672, 0.02127604, 0.02135417,
48 0.02133301, 0.02133301, 0.02133311, 0.02133334, 0.02133345])48 0.02133301, 0.02133301, 0.02133311, 0.02133334, 0.02133345])
49 49
50 def test_triangle_freqs_with_zeros(self):
51 """make sure set_triangle_bands works when list starts with 0"""
52 freq_list = [0, 40, 80]
53 freqs = np.array(freq_list, dtype = float_type)
54 f = filterbank(len(freqs)-2, 1024)
55 f.set_triangle_bands(freqs, 48000)
56 assert_equal ( f(cvec(1024)), 0)
57 self.assertIsInstance(f.get_coeffs(), np.ndarray)
58
50if __name__ == '__main__':59if __name__ == '__main__':
51 import nose260 import nose2
52 nose2.main()61 nose2.main()

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