Commit 58ce286c authored by Martin Reinecke's avatar Martin Reinecke

Merge branch 'sincos' of gitlab.mpcdf.mpg.de:mtr/pypocketfft into sincos

parents 532fa159 6ef09ab7
......@@ -204,6 +204,9 @@ def testdcst1D(len, inorm, type, dtype):
a = (np.random.rand(len)-0.5).astype(dtype)
eps = tol[dtype]
itp = (0, 1, 3, 2, 4)
if type==4 and len%2 == 1: # relaxed accuracies for odd-length type 4 transforms
special_tol = {np.float32: 4e-5, np.float64: 6e-14, np.longfloat: 4e-17}
eps = special_tol[dtype]
itype = itp[type]
if type != 1 or len > 1: # there are no length-1 type 1 DCTs
_assert_close(a, pypocketfft.dct(pypocketfft.dct(a, inorm=inorm, type=type), inorm=2-inorm, type=itype), eps)
......
Markdown is supported
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