view swig/python/test.py @ 95:432d97ee02ef

Minor modifications to MFCC init, mainly just code formatting
author Dan Stowell <danstowell@gmail.com>
date Wed, 03 Oct 2007 10:01:15 +0000
parents 35a3bb5c3ffd
children 1cbbe5b5e461
line wrap: on
line source
#!/usr/bin/python

try:
    import xtract
except ImportError:
    print 'Failed to load the library "jxtract"'

print '\nRunning libxtract Python bindings test...\n'

len = 5

a = xtract.floatArray(len)
temp = []

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]

print '\nFinished!\n'