def test_ifft_pattern_real(self, shift): # Odd second dimension becomes even with only real valued FFT p = np.random.random((101, 100)) p_fft = fft(p, shift=shift, real_fft_only=False) p_ifft = ifft(p_fft, shift=shift, real_fft_only=False) p_rfft = fft(p, shift=shift, real_fft_only=True) p_irfft = ifft(p_rfft, shift=shift, real_fft_only=True) assert p_ifft.shape == p.shape assert p_irfft.shape == p.shape assert np.allclose(p_ifft, p_irfft)
def test_ifft_pattern(self, shift): p = np.random.random((101, 101)) p_fft = fft(p, shift=shift) p_ifft = ifft(p_fft, shift=shift) assert np.allclose(p_ifft, p)