From ac0320067be731e5fed0565c878a3f805fac8b94 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Thu, 15 Sep 2022 18:20:47 +0200 Subject: [PATCH] do not repeat code --- src/jacobi/core.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/jacobi/core.py b/src/jacobi/core.py index 73815e8..ac60507 100644 --- a/src/jacobi/core.py +++ b/src/jacobi/core.py @@ -319,13 +319,6 @@ def fn(x): so the Jacobian computed from fn(x) has zero off-diagonal entries. In this case, one can speed up the calculation significantly with a special keyword:: - def fn(x): - return x ** 2 + 1 - - x = [1, 2] - xcov = [[3, 1], - [1, 4]] - # same result as before, but faster and uses much less memory y, ycov = propagate(fn, x, xcov, diagonal=True)