Esempio n. 1
0
 def test_front_back_2(self):
     s = np.random.randn(101)
     try:
         res = bm.irfft(bm.rfft(s))
     except AttributeError as e:
         self.skipTest('Not compiled with FFTW')
     np.testing.assert_almost_equal(res, fft.irfft(fft.rfft(s)), 8)
Esempio n. 2
0
    def test_irfft_10(self):
        s = np.random.randn(100)
        o = fft.rfft(s)
        try:
            res = bm.irfft(o, n=101)
        except AttributeError as e:
            self.skipTest('Not compiled with FFTW')

        np.testing.assert_almost_equal(res, fft.irfft(o, n=101), 8)