diff options
Diffstat (limited to 'numpy/fft/tests')
-rw-r--r-- | numpy/fft/tests/test_helper.py | 11 | ||||
-rw-r--r-- | numpy/fft/tests/test_pocketfft.py | 14 |
2 files changed, 9 insertions, 16 deletions
diff --git a/numpy/fft/tests/test_helper.py b/numpy/fft/tests/test_helper.py index 6613c8002..68f5990af 100644 --- a/numpy/fft/tests/test_helper.py +++ b/numpy/fft/tests/test_helper.py @@ -3,13 +3,12 @@ Copied from fftpack.helper by Pearu Peterson, October 2005 """ -from __future__ import division, absolute_import, print_function import numpy as np -from numpy.testing import assert_array_almost_equal, assert_equal +from numpy.testing import assert_array_almost_equal from numpy import fft, pi -class TestFFTShift(object): +class TestFFTShift: def test_definition(self): x = [0, 1, 2, 3, 4, -4, -3, -2, -1] @@ -135,7 +134,7 @@ class TestFFTShift(object): original_ifftshift(inp, axes_keyword)) -class TestFFTFreq(object): +class TestFFTFreq: def test_definition(self): x = [0, 1, 2, 3, 4, -4, -3, -2, -1] @@ -146,7 +145,7 @@ class TestFFTFreq(object): assert_array_almost_equal(10*pi*fft.fftfreq(10, pi), x) -class TestRFFTFreq(object): +class TestRFFTFreq: def test_definition(self): x = [0, 1, 2, 3, 4] @@ -157,7 +156,7 @@ class TestRFFTFreq(object): assert_array_almost_equal(10*pi*fft.rfftfreq(10, pi), x) -class TestIRFFTN(object): +class TestIRFFTN: def test_not_last_axis_success(self): ar, ai = np.random.random((2, 16, 8, 32)) diff --git a/numpy/fft/tests/test_pocketfft.py b/numpy/fft/tests/test_pocketfft.py index 453e964fa..7c3db0485 100644 --- a/numpy/fft/tests/test_pocketfft.py +++ b/numpy/fft/tests/test_pocketfft.py @@ -1,5 +1,3 @@ -from __future__ import division, absolute_import, print_function - import numpy as np import pytest from numpy.random import random @@ -7,11 +5,7 @@ from numpy.testing import ( assert_array_equal, assert_raises, assert_allclose ) import threading -import sys -if sys.version_info[0] >= 3: - import queue -else: - import Queue as queue +import queue def fft1(x): @@ -21,13 +15,13 @@ def fft1(x): return np.sum(x*np.exp(phase), axis=1) -class TestFFTShift(object): +class TestFFTShift: def test_fft_n(self): assert_raises(ValueError, np.fft.fft, [1, 2, 3], 0) -class TestFFT1D(object): +class TestFFT1D: def test_identity(self): maxlen = 512 @@ -222,7 +216,7 @@ def test_fft_with_order(dtype, order, fft): raise ValueError() -class TestFFTThreadSafe(object): +class TestFFTThreadSafe: threads = 16 input_shape = (800, 200) |