Skip to content

Commit

Permalink
MAINT: PEP8 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
oyamad committed May 2, 2021
1 parent dfbdb34 commit 8a8813c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion quantecon/lss.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def __partition(self):
num_const = 0
for idx in range(n):
if (A_diag[idx] == 1) and (C[idx, :] == 0).all() \
and np.linalg.norm(A[idx, :]) == 1:
and np.linalg.norm(A[idx, :]) == 1:
sorted_idx.insert(0, idx)
num_const += 1
else:
Expand Down
8 changes: 5 additions & 3 deletions quantecon/tests/test_lss.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def test_stationarity(self):

assert_allclose(ssmux.flatten(), np.array([2.5, 2.5, 1]))
assert_allclose(ssmuy.flatten(), np.array([2.5]))
assert_allclose(sssigx, self.ss2.A @ sssigx @ self.ss2.A.T + self.ss2.C @ self.ss2.C.T)
assert_allclose(
sssigx,
self.ss2.A @ sssigx @ self.ss2.A.T + self.ss2.C @ self.ss2.C.T
)
assert_allclose(sssigy, self.ss2.G @ sssigx @ self.ss2.G.T)
assert_allclose(sssigyx, self.ss2.G @ sssigx)

Expand All @@ -61,7 +64,7 @@ def test_simulate(self):

sim = ss.simulate(ts_length=250)
for arr in sim:
self.assertTrue(len(arr[0])==250)
self.assertTrue(len(arr[0]) == 250)

def test_simulate_with_seed(self):
ss = self.ss1
Expand Down Expand Up @@ -101,4 +104,3 @@ def test_non_square_A():
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(TestLinearStateSpace)
unittest.TextTestRunner(verbosity=2, stream=sys.stderr).run(suite)

0 comments on commit 8a8813c

Please sign in to comment.