Skip to content

Commit 9d0fb5b

Browse files
authored
Fix variables never used lgtm warnings in dle.py. (#542)
* Fix variables never used lgtm warnings in dle.py. * remove junk variable from dle.py
1 parent 83acd0f commit 9d0fb5b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

quantecon/dle.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Provides a class called DLE to convert and solve dynamic linear economics
2+
Provides a class called DLE to convert and solve dynamic linear economies
33
(as set out in Hansen & Sargent (2013)) as LQ problems.
44
"""
55

@@ -69,15 +69,14 @@ def __init__(self, information, technology, preferences):
6969
self.nb, self.nh = self.llambda.shape
7070
self.nd, self.nc = self.phic.shape
7171
self.nz, self.nw = self.c2.shape
72-
junk, self.ng = self.phig.shape
72+
_, self.ng = self.phig.shape
7373
self.nk, self.ni = self.thetak.shape
7474

7575
# === Creation of various useful matrices === #
7676
uc = np.hstack((np.eye(self.nc), np.zeros((self.nc, self.ng))))
7777
ug = np.hstack((np.zeros((self.ng, self.nc)), np.eye(self.ng)))
7878
phiin = np.linalg.inv(np.hstack((self.phic, self.phig)))
7979
phiinc = uc.dot(phiin)
80-
phiing = ug.dot(phiin)
8180
b11 = - self.thetah.dot(phiinc).dot(self.phii)
8281
a1 = self.thetah.dot(phiinc).dot(self.gamma)
8382
a12 = np.vstack((self.thetah.dot(phiinc).dot(
@@ -306,7 +305,6 @@ def canonical(self):
306305
Ac2 = np.hstack((np.zeros((self.nz, self.nh)), self.a22))
307306
Ac = np.vstack((Ac1, Ac2))
308307
Bc = np.vstack((self.thetah, np.zeros((self.nz, self.nc))))
309-
Cc = np.vstack((np.zeros((self.nh, self.nw)), self.c2))
310308
Rc1 = np.hstack((self.llambda.T.dot(self.llambda), -
311309
self.llambda.T.dot(self.ub)))
312310
Rc2 = np.hstack((-self.ub.T.dot(self.llambda), self.ub.T.dot(self.ub)))

0 commit comments

Comments
 (0)