From c50024d14c2e18b9f0a5df989bb297dee46b90a1 Mon Sep 17 00:00:00 2001 From: Philipp Arras <parras@mpa-garching.mpg.de> Date: Tue, 12 May 2020 17:53:56 +0200 Subject: [PATCH] Fixup --- nifty6/extra.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nifty6/extra.py b/nifty6/extra.py index 8bb146aed..e5a303fbd 100644 --- a/nifty6/extra.py +++ b/nifty6/extra.py @@ -296,4 +296,11 @@ def check_jacobian_consistency(op, loc, tol=1e-8, ntries=100, perf_check=True): print(hist) raise ValueError("gradient and value seem inconsistent") loc = locnext - consistency_check(linmid.jac) + + # FIXME The following code shows that we need prober tests for complex + # derivatives + ddtype = loc.values()[0].dtype if isinstance(loc, MultiField) else loc.dtype + tdtype = dirder.values()[0].dtype if isinstance(dirder, MultiField) else dirder.dtype + only_r_linear = ddtype != tdtype + consistency_check(linmid.jac, domain_dtype=ddtype, target_dtype=tdtype, + only_r_linear=only_r_linear) -- GitLab