source:
python/tests/test_scale.py.old
@
f217068
Last change on this file since f217068 was 584016f, checked in by , 11 years ago | |
---|---|
|
|
File size: 499 bytes |
Line | |
---|---|
1 | #! /usr/bin/env python |
2 | |
3 | from numpy.testing import TestCase, run_module_suite |
4 | from numpy.testing import assert_equal, assert_almost_equal |
5 | from numpy import arange |
6 | from aubio import fvec, scale |
7 | |
8 | class 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 | |
16 | if __name__ == '__main__': |
17 | from unittest import main |
18 | main() |
Note: See TracBrowser
for help on using the repository browser.