Changeset de0a492
- Timestamp:
- May 3, 2016, 4:19:28 AM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- fcef3fd
- Parents:
- 7aed123
- Location:
- python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-filterbank.c
r7aed123 rde0a492 90 90 91 91 if (!PyAubio_PyCvecToCCvec(input, &(self->vec) )) { 92 return NULL; 93 } 94 95 if (self->vec.length != self->win_s / 2 + 1) { 96 PyErr_Format(PyExc_ValueError, 97 "input cvec has length %d, but fft expects length %d", 98 self->vec.length, self->win_s / 2 + 1); 92 99 return NULL; 93 100 } -
python/tests/test_filterbank.py
r7aed123 rde0a492 62 62 assert_almost_equal ( expected, f.get_coeffs() ) 63 63 64 def test_filterbank_long_cvec(self): 65 f = filterbank(40, 512) 66 with self.assertRaises(ValueError): 67 f(cvec(1024)) 68 69 def test_filterbank_short_cvec(self): 70 f = filterbank(40, 512) 71 with self.assertRaises(ValueError): 72 f(cvec(256)) 73 64 74 if __name__ == '__main__': 65 75 from nose2 import main
Note: See TracChangeset
for help on using the changeset viewer.