summaryrefslogtreecommitdiff
path: root/python/tests/test_fft.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/test_fft.py')
-rwxr-xr-xpython/tests/test_fft.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/tests/test_fft.py b/python/tests/test_fft.py
index fa349e5..a8f82b9 100755
--- a/python/tests/test_fft.py
+++ b/python/tests/test_fft.py
@@ -33,7 +33,14 @@ class aubio_fft_test_case(TestCase):
f = fft (win_s)
fftgrain = f (timegrain)
assert_equal ( fftgrain.norm, 0 )
- assert_equal ( fftgrain.phas, 0 )
+ try:
+ assert_equal ( fftgrain.phas, 0 )
+ except AssertionError:
+ assert_equal (fftgrain.phas[fftgrain.phas > 0], +pi)
+ assert_equal (fftgrain.phas[fftgrain.phas < 0], -pi)
+ assert_equal (np.abs(fftgrain.phas[np.abs(fftgrain.phas) != pi]), 0)
+ self.skipTest('fft(fvec(%d)).phas != +0, ' % win_s \
+ + 'This is expected when using fftw3 on powerpc.')
def test_impulse(self):
""" check the transform of one impulse at a random place """