tas = time.time()
fftf = numpy.fft.fftn(f)
tas = time.time() - tas
print('3D FFT, numpy:', tas)
tas = time.time()
fftf = scipy.fftpack.fftn(f)
tas = time.time() - tas
print('3D FFT, scipy/fftpack:', tas)
f = pyfftw.n_byte_align_empty((128, 512, 512), 16, dtype='complex128')
fftf = pyfftw.interfaces.numpy_fft.fftn(f)
tas = time.time()
fftf = pyfftw.interfaces.numpy_fft.fftn(f)
tas = time.time() - tas
print('3D padded FFT, pyfftw:', tas)
Comparatively slow python numpy 3D Fourier Transformation