Example #1
0
 def check_definition(self):
     x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
     y = ifftn(x)
     assert_array_almost_equal(y, direct_idftn(x))
     x = random((20, 26))
     assert_array_almost_equal(ifftn(x), direct_idftn(x))
     x = random((5, 4, 3, 20))
     assert_array_almost_equal(ifftn(x), direct_idftn(x))
Example #2
0
 def check_random_complex(self):
     for size in [1, 2, 51, 32, 64, 92]:
         x = random([size, size]) + 1j * random([size, size])
         assert_array_almost_equal(ifftn(fftn(x)), x)
         assert_array_almost_equal(fftn(ifftn(x)), x)