Changeset 95e3cba
- Timestamp:
- Sep 15, 2018, 4:20:21 PM (6 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
- Children:
- 0fbbb067, 3aac194
- Parents:
- 49b19d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_dct.py
r49b19d4 r95e3cba 25 25 26 26 >>> from scipy.fftpack import dct 27 >>> a_in = np.arange(8).astype( 'float32')27 >>> a_in = np.arange(8).astype(aubio.float_type) 28 28 >>> precomputed = dct(a_in, norm='ortho') 29 29 """ 30 30 N = len(precomputed_arange) 31 31 a_dct = aubio.dct(8) 32 a_in = np.arange(8).astype( 'float32')32 a_in = np.arange(8).astype(aubio.float_type) 33 33 a_expected = aubio.fvec(precomputed_arange) 34 34 assert_almost_equal(a_dct(a_in), a_expected, decimal=6) … … 37 37 """ test that dct(somevector) is computed correctly """ 38 38 a_dct = aubio.dct(16) 39 a_in = np.ones(16).astype( 'float32')39 a_in = np.ones(16).astype(aubio.float_type) 40 40 a_in[1] = 0 41 41 a_in[3] = np.pi … … 46 46 """ test that some_ones vector can be recontructed """ 47 47 a_dct = aubio.dct(16) 48 a_in = np.ones(16).astype( 'float32')48 a_in = np.ones(16).astype(aubio.float_type) 49 49 a_in[1] = 0 50 50 a_in[3] = np.pi
Note: See TracChangeset
for help on using the changeset viewer.