source: python/tests/test_scale.py @ 650cae3

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 650cae3 was 68d0492, checked in by Paul Brossier <piem@piem.org>, 12 years ago

tests/python/src/utils/scale.py: replace with python/tests/test_scale.py

  • Property mode set to 100755
File size: 499 bytes
RevLine 
[68d0492]1#! /usr/bin/env python
2
3from numpy.testing import TestCase, run_module_suite
4from numpy.testing import assert_equal, assert_almost_equal
5from numpy import arange
6from aubio import fvec, scale
7
8class aubio_cvec_test_case(TestCase):
9
10    def test_scale_simple(self):
11        a = arange(10).astype('float32')
12        s = scale ( 0., 10., 3., 8.)
13        s(a)
14        assert_equal ( a, [ 3., 3.5, 4., 4.5, 5., 5.5, 6., 6.5, 7., 7.5])
15
16if __name__ == '__main__':
17    from unittest import main
18    main()
Note: See TracBrowser for help on using the repository browser.