Changeset 95e3cba


Ignore:
Timestamp:
Sep 15, 2018, 4:20:21 PM (14 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master
Children:
0fbbb067, 3aac194
Parents:
49b19d4
Message:

python/tests/test_dct.py: use float_type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_dct.py

    r49b19d4 r95e3cba  
    2525
    2626        >>> from scipy.fftpack import dct
    27         >>> a_in = np.arange(8).astype('float32')
     27        >>> a_in = np.arange(8).astype(aubio.float_type)
    2828        >>> precomputed = dct(a_in, norm='ortho')
    2929        """
    3030        N = len(precomputed_arange)
    3131        a_dct = aubio.dct(8)
    32         a_in = np.arange(8).astype('float32')
     32        a_in = np.arange(8).astype(aubio.float_type)
    3333        a_expected = aubio.fvec(precomputed_arange)
    3434        assert_almost_equal(a_dct(a_in), a_expected, decimal=6)
     
    3737        """ test that dct(somevector) is computed correctly """
    3838        a_dct = aubio.dct(16)
    39         a_in = np.ones(16).astype('float32')
     39        a_in = np.ones(16).astype(aubio.float_type)
    4040        a_in[1] = 0
    4141        a_in[3] = np.pi
     
    4646        """ test that some_ones vector can be recontructed """
    4747        a_dct = aubio.dct(16)
    48         a_in = np.ones(16).astype('float32')
     48        a_in = np.ones(16).astype(aubio.float_type)
    4949        a_in[1] = 0
    5050        a_in[3] = np.pi
Note: See TracChangeset for help on using the changeset viewer.