MCPcopy Create free account
hub / github.com/numpy/numpy / test_fft

Method test_fft

numpy/fft/tests/test_pocketfft.py:36–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 xr[0:i], atol=1e-12)
35
36 def test_fft(self):
37 x = random(30) + 1j*random(30)
38 assert_allclose(fft1(x), np.fft.fft(x), atol=1e-6)
39 assert_allclose(fft1(x), np.fft.fft(x, norm="backward"), atol=1e-6)
40 assert_allclose(fft1(x) / np.sqrt(30),
41 np.fft.fft(x, norm="ortho"), atol=1e-6)
42 assert_allclose(fft1(x) / 30.,
43 np.fft.fft(x, norm="forward"), atol=1e-6)
44
45 @pytest.mark.parametrize('norm', (None, 'backward', 'ortho', 'forward'))
46 def test_ifft(self, norm):

Callers

nothing calls this directly

Calls 2

assert_allcloseFunction · 0.90
fft1Function · 0.85

Tested by

no test coverage detected