def check_definition(self): x = [1, 2, 3, 4, 1, 2, 3, 4] y = rfft(x) y1 = direct_rdft(x) assert_array_almost_equal(y, y1) x = [1, 2, 3, 4, 1, 2, 3, 4, 5] y = rfft(x) y1 = direct_rdft(x) assert_array_almost_equal(y, y1)
def check_random_real(self): for size in [1, 51, 111, 100, 200, 64, 128, 256, 1024]: x = random([size]).astype(double) assert_array_almost_equal(irfft(rfft(x)), x) assert_array_almost_equal(rfft(irfft(x)), x)