def test_ffts(self):
t, tsc, y, err = data()
yhat = np.empty(len(y))
yg = gpuarray.to_gpu(y.astype(np.complex128))
yghat = gpuarray.to_gpu(yhat.astype(np.complex128))
plan = cufft.Plan(len(y), np.complex128, np.complex128)
cufft.ifft(yg, yghat, plan)
yhat = fftpack.ifft(y) * len(y)
tols = dict(rtol=nfft_rtol, atol=nfft_atol)
assert_allclose(yhat, yghat.get(), **tols)
评论列表
文章目录