Ignore:
Timestamp:
Apr 25, 2016, 12:53:03 AM (8 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, pitchshift, sampler, timestretch, yinfft+
Children:
8bffcff
Parents:
fbcee4f
Message:

python/tests: use aubio.float_type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_musicutils.py

    rfbcee4f rc4b2183  
    88from aubio import window, level_lin, db_spl, silence_detection, level_detection
    99
    10 from aubio import fvec
     10from aubio import fvec, float_type
    1111
    1212class aubio_window(TestCase):
     
    5454    def test_minus_ones_is_one(self):
    5555        from numpy import ones
    56         assert_equal(level_lin(-ones(1024, dtype="float32")), 1.)
     56        assert_equal(level_lin(-ones(1024, dtype = float_type)), 1.)
    5757
    5858class aubio_db_spl(TestCase):
     
    7474    def test_minus_ones_is_zero(self):
    7575        from numpy import ones
    76         assert_equal(db_spl(-ones(1024, dtype="float32")), 0.)
     76        assert_equal(db_spl(-ones(1024, dtype = float_type)), 0.)
    7777
    7878class aubio_silence_detection(TestCase):
     
    9494    def test_minus_ones_is_zero(self):
    9595        from numpy import ones
    96         assert silence_detection(ones(1024, dtype="float32"), -70) == 0
     96        assert silence_detection(ones(1024, dtype = float_type), -70) == 0
    9797
    9898class aubio_level_detection(TestCase):
     
    114114    def test_minus_ones_is_zero(self):
    115115        from numpy import ones
    116         assert level_detection(ones(1024, dtype="float32"), -70) == 0
     116        assert level_detection(ones(1024, dtype = float_type), -70) == 0
    117117
    118118if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.