Changeset 0b6d23d for python/tests/test_phasevoc.py
- Timestamp:
- May 16, 2016, 5:08:18 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:
- a6f9ebf
- Parents:
- 58a5fb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_phasevoc.py
r58a5fb9 r0b6d23d 3 3 from numpy.testing import TestCase, assert_equal, assert_array_less 4 4 from aubio import fvec, cvec, pvoc, float_type 5 from nose2 import main 5 6 from nose2.tools import params 6 7 import numpy as np … … 41 42 f = pvoc (win_s, hop_s) 42 43 t = fvec (hop_s) 43 for timein range( int ( 4 * win_s / hop_s ) ):44 for _ in range( int ( 4 * win_s / hop_s ) ): 44 45 s = f(t) 45 46 r = f.rdo(s) … … 103 104 zeros = fvec(hop_s) 104 105 r2 = f.rdo( f(sigin) ) 105 for iin range(1, ratio):106 for _ in range(1, ratio): 106 107 r2 = f.rdo( f(zeros) ) 107 108 # compute square errors … … 178 179 with self.assertRaises(RuntimeError): 179 180 pvoc(win_s, hop_s) 180 except AssertionError as e:181 except AssertionError: 181 182 # when compiled with fftw3, aubio supports non power of two fft sizes 182 183 self.skipTest('creating aubio.pvoc with size %d did not fail' % win_s) 183 184 184 185 if __name__ == '__main__': 185 from nose2 import main186 186 main() 187 187
Note: See TracChangeset
for help on using the changeset viewer.