Skip to content
Snippets Groups Projects
Commit d5334da6 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

revert a few changes in test codes

parent 08c85d30
No related branches found
No related tags found
1 merge request!30Various updates
......@@ -107,7 +107,7 @@ def bench_nd(ndim, nmax, ntry, tp, funcs, nrepeat, ttl="", filename=""):
plt.show()
funcs = (measure_pypocketfft, measure_fftw_np_interface)
funcs = (measure_pypocketfft, measure_fftw)
ttl = "pypocketfft/FFTW()"
bench_nd(1, 8192, 100, "c16", funcs, 10, ttl, "1d.png")
bench_nd(2, 2048, 100, "c16", funcs, 2, ttl, "2d.png")
......
......@@ -2,8 +2,6 @@ import numpy as np
import pypocketfft
np.random.seed(42)
def _l2error(a, b, axes):
return np.sqrt(np.sum(np.abs(a-b)**2)/np.sum(np.abs(a)**2))/np.log2(np.max([2,np.prod(np.take(a.shape,axes))]))
......@@ -28,7 +26,7 @@ def irfftn(a, axes=None, lastsize=0, inorm=0, nthreads=1):
inorm=inorm, nthreads=nthreads)
nthreads = 1
nthreads = 0
def update_err(err, name, value):
......@@ -42,9 +40,9 @@ def update_err(err, name, value):
def test(err):
ndim = 3# np.random.randint(1, 5)
ndim = np.random.randint(1, 5)
axlen = int((2**20)**(1./ndim))
shape = (np.random.randint(1, axlen, ndim)//2)*2+1
shape = np.random.randint(1, axlen, ndim)
axes = np.arange(ndim)
np.random.shuffle(axes)
nax = np.random.randint(1, ndim+1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment