From 5e1d8a68c0f75f21aaeeeb1b87d017932f2be664 Mon Sep 17 00:00:00 2001 From: Emre K <110906681+kocaemre@users.noreply.github.com> Date: Mon, 10 Aug 2026 18:38:29 +0200 Subject: [PATCH] FIX: remove unused numerical locals Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com> --- quantecon/_kalman.py | 2 +- quantecon/_lss.py | 2 +- quantecon/_matrix_eqn.py | 2 +- quantecon/_robustlq.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quantecon/_kalman.py b/quantecon/_kalman.py index 0acf3916..952fad28 100644 --- a/quantecon/_kalman.py +++ b/quantecon/_kalman.py @@ -158,7 +158,7 @@ def whitener_lss(self): K = self.K_infinity # Get the matrix sizes - n, k, m, l = self.ss.n, self.ss.k, self.ss.m, self.ss.l + n, m, l = self.ss.n, self.ss.m, self.ss.l A, C, G, H = self.ss.A, self.ss.C, self.ss.G, self.ss.H Atil = np.vstack([np.hstack([A, np.zeros((n, n)), np.zeros((n, l))]), diff --git a/quantecon/_lss.py b/quantecon/_lss.py index de1c6348..5deb93c9 100644 --- a/quantecon/_lss.py +++ b/quantecon/_lss.py @@ -391,7 +391,7 @@ def impulse_response(self, j=5): The coefficients for y """ # Pull out matrices - A, C, G, H = self.A, self.C, self.G, self.H + A, C, G = self.A, self.C, self.G Apower = np.copy(A) # Create room for coefficients diff --git a/quantecon/_matrix_eqn.py b/quantecon/_matrix_eqn.py index e2bb6f72..97892fde 100644 --- a/quantecon/_matrix_eqn.py +++ b/quantecon/_matrix_eqn.py @@ -272,7 +272,7 @@ def solve_discrete_riccati_system(Π, As, Bs, Cs, Qs, Rs, Ns, beta, """ m = Qs.shape[0] - k, n = Qs.shape[1], Rs.shape[1] + n = Rs.shape[1] # Create the Ps matrices, initialize as identity matrix Ps = np.array([np.eye(n) for i in range(m)]) Ps1 = np.copy(Ps) diff --git a/quantecon/_robustlq.py b/quantecon/_robustlq.py index 481b5def..570dfb52 100644 --- a/quantecon/_robustlq.py +++ b/quantecon/_robustlq.py @@ -242,8 +242,8 @@ def robust_rule_simple(self, P_init=None, max_iter=80, tol=1e-8): """ # == Simplify names == # - A, B, C, Q, R = self.A, self.B, self.C, self.Q, self.R - beta, theta = self.beta, self.theta + A, B, C = self.A, self.B, self.C + theta = self.theta # == Set up loop == # P = np.zeros((self.n, self.n)) if P_init is None else P_init iterate, e = 0, tol + 1 @@ -381,7 +381,7 @@ def evaluate_F(self, F): """ # == Simplify names == # - Q, R, A, B, C = self.Q, self.R, self.A, self.B, self.C + A, B, C = self.A, self.B, self.C beta, theta = self.beta, self.theta # == Solve for policies and costs using agent 2's problem == #