From 41c297be1446fe9506a48edd39a91c1271937d67 Mon Sep 17 00:00:00 2001 From: Peter Sharpe Date: Thu, 4 Jan 2024 22:47:39 +0100 Subject: [PATCH] add a stacklevel trace in opti, to allow proper error tracing --- aerosandbox/optimization/opti.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aerosandbox/optimization/opti.py b/aerosandbox/optimization/opti.py index 355ccf5f..63688ca2 100644 --- a/aerosandbox/optimization/opti.py +++ b/aerosandbox/optimization/opti.py @@ -1168,6 +1168,7 @@ def constrain_derivative(self, ) duals = self.subject_to( np.diff(variable) == integrals, + _stacklevel=_stacklevel + 1 ) return duals