Skip to content

Commit 0e56dba

Browse files
authored
Fix lgtm warnings in quadsums.py. (#541)
1 parent b722605 commit 0e56dba

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

quantecon/quadsums.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77

88
import numpy as np
9-
from numpy import sqrt, dot
109
import scipy.linalg
1110
from .matrix_eqn import solve_discrete_lyapunov
1211

@@ -54,10 +53,10 @@ def var_quadratic_sum(A, C, H, beta, x0):
5453
A, C, H = list(map(np.atleast_2d, (A, C, H)))
5554
x0 = np.atleast_1d(x0)
5655
# == Start computations == #
57-
Q = scipy.linalg.solve_discrete_lyapunov(sqrt(beta) * A.T, H)
58-
cq = dot(dot(C.T, Q), C)
56+
Q = scipy.linalg.solve_discrete_lyapunov(np.sqrt(beta) * A.T, H)
57+
cq = np.dot(np.dot(C.T, Q), C)
5958
v = np.trace(cq) * beta / (1 - beta)
60-
q0 = dot(dot(x0.T, Q), x0) + v
59+
q0 = np.dot(np.dot(x0.T, Q), x0) + v
6160

6261
return q0
6362

0 commit comments

Comments
 (0)