Mercurial > hg > libxtract
view swig/python/test.py @ 99:8ba3e526c038
Committed missing files needed for new out-of-place fftw plan creation
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Mon, 08 Oct 2007 10:32:16 +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'