Commit 72b854ae authored by Martin Reinecke's avatar Martin Reinecke
Browse files

stress test new fftn() call with real-valued input

parent 7890f60c
...@@ -24,6 +24,11 @@ def test(): ...@@ -24,6 +24,11 @@ def test():
a=np.random.rand(*shape)-0.5 + 1j*np.random.rand(*shape)-0.5j a=np.random.rand(*shape)-0.5 + 1j*np.random.rand(*shape)-0.5j
b=pypocketfft.ifftn(pypocketfft.fftn(a,axes=axes,nthreads=nthreads),axes=axes,inorm=2,nthreads=nthreads) b=pypocketfft.ifftn(pypocketfft.fftn(a,axes=axes,nthreads=nthreads),axes=axes,inorm=2,nthreads=nthreads)
err = _l2error(a,b) err = _l2error(a,b)
if err > cmaxerr:
cmaxerr = err
print("cmaxerr:", cmaxerr, shape, axes)
b=pypocketfft.ifftn(pypocketfft.fftn(a.real,axes=axes,nthreads=nthreads),axes=axes,inorm=2,nthreads=nthreads)
err = _l2error(a.real,b)
if err > cmaxerr: if err > cmaxerr:
cmaxerr = err cmaxerr = err
print("cmaxerr:", cmaxerr, shape, axes) print("cmaxerr:", cmaxerr, shape, axes)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment