diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2008-01-01 16:17:44 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2008-01-01 16:17:44 +0000 |
commit | 7f86524dd021c5905df111d1254004576fd872f0 (patch) | |
tree | f6ee0de29c3ca6d5cb28b081c19168623aef505f /swig/python | |
parent | 445505b69a8517b5ab586bfdba2e1c719aa9ef7d (diff) | |
download | LibXtract-7f86524dd021c5905df111d1254004576fd872f0.tar.gz LibXtract-7f86524dd021c5905df111d1254004576fd872f0.tar.bz2 LibXtract-7f86524dd021c5905df111d1254004576fd872f0.zip |
- Improvements to SWIG bindings generation script
- Fixed omission in xtract_bark_coefficients that was causing the output to be complete b/s! This fixed bark_coeffs and loudness feature which depends on it
- Changes to descriptor API: added is_delta and id. id corresponds to value in xtract_features_ enum and is useful for programmatic conversions between id and name string.
Diffstat (limited to 'swig/python')
-rw-r--r-- | swig/python/test.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/swig/python/test.py b/swig/python/test.py index 923adb7..e2f0d24 100644 --- a/swig/python/test.py +++ b/swig/python/test.py @@ -16,8 +16,16 @@ for i in range(0, len): a[i] = 2 * i temp.append(str(a[i])) -print 'The mean of ' + ', '.join(temp) + ' is: %.2f' % \ - xtract.xtract_mean(a,len,None)[1] +mean = xtract.xtract_mean(a,len,None)[1] + +print 'The mean of ' + ', '.join(temp) + ' is: %.2f' % mean + +argv = xtract.floatArray(1) +argv[0] = mean + +variance = xtract.xtract_variance(a, len, argv)[1] + +print 'The variance is %.2f' % variance print 'Computing spectrum...' |