diff --git a/quantecon/matrix_eqn.py b/quantecon/matrix_eqn.py index 01dceaab5..c09de599a 100644 --- a/quantecon/matrix_eqn.py +++ b/quantecon/matrix_eqn.py @@ -160,7 +160,7 @@ def solve_discrete_riccati(A, B, Q, R, N=None, tolerance=1e-10, max_iter=500): # == Choose optimal value of gamma in R_hat = R + gamma B'B == # current_min = np.inf - candidates = (0.0, 0.01, 0.1, 0.25, 0.5, 1.0, 2.0, 10.0, 100.0, 10e5) + candidates = (0.01, 0.1, 0.25, 0.5, 1.0, 2.0, 10.0, 100.0, 10e5) BB = dot(B.T, B) BTA = dot(B.T, A) for gamma in candidates: diff --git a/quantecon/tests/test_robustlq.py b/quantecon/tests/test_robustlq.py index f9c386564..d4d29773c 100644 --- a/quantecon/tests/test_robustlq.py +++ b/quantecon/tests/test_robustlq.py @@ -78,9 +78,10 @@ def test_robust_rule_vs_simple(self): assert_allclose(Kr, Ks, rtol=1e-4) assert_allclose(Pr, Ps, rtol=1e-4) + atol = 1e-10 assert_allclose(Fr_pf, Fs_pf, rtol=1e-4) - assert_allclose(Kr_pf, Ks_pf, rtol=1e-4) - assert_allclose(Pr_pf, Ps_pf, rtol=1e-4) + assert_allclose(Kr_pf, Ks_pf, rtol=1e-4, atol=atol) + assert_allclose(Pr_pf, Ps_pf, rtol=1e-4, atol=atol) def test_f2k_and_k2f(self):