Changeset 98c712e


Ignore:
Timestamp:
Nov 9, 2018, 5:30:38 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
edd3dac
Parents:
bc1ed63
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_filterbank_mel.py

    rbc1ed63 r98c712e  
    4848                    0.02133301, 0.02133301, 0.02133311, 0.02133334, 0.02133345])
    4949
     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
    5059if __name__ == '__main__':
    5160    import nose2
Note: See TracChangeset for help on using the changeset viewer.