Mercurial > hg > libxtract
view swig/python/test.py @ 98:ca40a0dc29d6
Removed fftw_plan from xtraction functions. Created new init function xtract_init_fft() for creating plans, which have global scope. Updated examples to reflect the change. New configure option: --with-fft_optimisation (0 = FFTW_ESTIMATE, 1 = FFTW_MEASURE, 2 = FFTW_PATIENT).
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Sat, 06 Oct 2007 16:36:00 +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'