From baf29e72b4cd61049829dbcd91c22da1e7306475 Mon Sep 17 00:00:00 2001 From: Johannes Kaisinger Date: Wed, 19 Jul 2023 22:34:55 +0200 Subject: [PATCH] Add shallow copy to ab13bd, fix reference call of state space parameters (A,B,C,D) --- slycot/analysis.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/slycot/analysis.py b/slycot/analysis.py index 32050236..d41e2043 100644 --- a/slycot/analysis.py +++ b/slycot/analysis.py @@ -1378,13 +1378,19 @@ def ab13bd(dico, jobn, n, m, p, A, B, C, D, tol = 0.0): denominator of `G` (see the SLICOT subroutine SB08DD). """ - out = _wrapper.ab13bd(dico, jobn, n, m, p, A, B, C, D, tol) - hidden = ' (hidden by the wrapper)' arg_list = ('dico', 'jobn', 'n', 'm', 'p', 'A', 'lda' + hidden, 'B', 'ldb' + hidden, 'C', 'ldc' + hidden, 'D', 'ldd' + hidden, 'nq' + hidden,'tol', 'dwork' + hidden, 'ldwork' + hidden, 'iwarn', 'info') + + a = A.copy() + b = B.copy() + c = C.copy() + d = D.copy() + + out = _wrapper.ab13bd(dico, jobn, n, m, p, a, b, c, d, tol) + raise_if_slycot_error(out[-2:], arg_list, ab13bd.__doc__, locals()) return out[0]