Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: fix doxstring for compte_sequence in lqcontrol #157

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,24 @@ quantecon/distributions.py
quantecon/ecdf.py
quantecon/estspec.py
quantecon/graph_tools.py
quantecon/gth_solve.py
quantecon/gridtools.py
quantecon/ivp.py
quantecon/kalman.py
quantecon/lae.py
quantecon/lqcontrol.py
quantecon/lqnash.py
quantecon/lss.py
quantecon/matrix_eqn.py
quantecon/mc_tools.py
quantecon/quad.py
quantecon/quadsums.py
quantecon/rank_nullspace.py
quantecon/robustlq.py
quantecon/tauchen.py
quantecon/timing.py
quantecon/version.py
quantecon/markov/__init__.py
quantecon/markov/approximation.py
quantecon/markov/core.py
quantecon/markov/gth_solve.py
quantecon/markov/random.py
quantecon/models/__init__.py
quantecon/models/asset_pricing.py
quantecon/models/career.py
Expand All @@ -42,15 +44,16 @@ quantecon/models/solow/ces.py
quantecon/models/solow/cobb_douglas.py
quantecon/models/solow/impulse_response.py
quantecon/models/solow/model.py
quantecon/random/__init__.py
quantecon/random/utilities.py
quantecon/tests/__init__.py
quantecon/tests/test_arma.py
quantecon/tests/test_cartesian.py
quantecon/tests/test_compute_fp.py
quantecon/tests/test_discrete_rv.py
quantecon/tests/test_ecdf.py
quantecon/tests/test_estspec.py
quantecon/tests/test_graph_tools.py
quantecon/tests/test_gth_solve.py
quantecon/tests/test_gridtools.py
quantecon/tests/test_ivp.py
quantecon/tests/test_kalman.py
quantecon/tests/test_lae.py
Expand All @@ -59,12 +62,15 @@ quantecon/tests/test_lqnash.py
quantecon/tests/test_lss.py
quantecon/tests/test_lyapunov.py
quantecon/tests/test_matrix_eqn.py
quantecon/tests/test_mc_tools.py
quantecon/tests/test_quad.py
quantecon/tests/test_quadsum.py
quantecon/tests/test_rank_nullspace.py
quantecon/tests/test_ricatti.py
quantecon/tests/test_robustlq.py
quantecon/tests/test_tauchen.py
quantecon/tests/test_timing.py
quantecon/tests/util.py
quantecon/util/__init__.py
quantecon/util/array.py
quantecon/util/common_messages.py
quantecon/util/external.py
quantecon/util/random.py
quantecon/util/timing.py
13 changes: 7 additions & 6 deletions quantecon/lqcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ def compute_sequence(self, x0, ts_length=None):
Returns
========
x_path : array_like(float)
An n x T matrix, where the t-th column represents x_t
An n x T+1 matrix, where the t-th column represents x_t

u_path : array_like(float)
A k x T matrix, where the t-th column represents u_t

w_path : array_like(float)
A j x T matrix, where the t-th column represent w_t
A j x T+1 matrix, where the t-th column represent w_t

"""

Expand All @@ -266,7 +266,8 @@ def compute_sequence(self, x0, ts_length=None):
x0 = x0.reshape(self.n, 1) # Make sure x0 is a column vector
x_path = np.empty((self.n, T+1))
u_path = np.empty((self.k, T))
w_path = dot(C, np.random.randn(self.j, T+1))
w_t = np.random.randn(self.j, T+1)
Cw_path = dot(C, w_t)

# == Compute and record the sequence of policies == #
policies = []
Expand All @@ -282,9 +283,9 @@ def compute_sequence(self, x0, ts_length=None):
for t in range(1, T):
F = policies.pop()
Ax, Bu = dot(A, x_path[:, t-1]), dot(B, u_path[:, t-1])
x_path[:, t] = Ax + Bu + w_path[:, t]
x_path[:, t] = Ax + Bu + Cw_path[:, t]
u_path[:, t] = - dot(F, x_path[:, t])
Ax, Bu = dot(A, x_path[:, T-1]), dot(B, u_path[:, T-1])
x_path[:, T] = Ax + Bu + w_path[:, T]
x_path[:, T] = Ax + Bu + Cw_path[:, T]

return x_path, u_path, w_path
return x_path, u_path, w_t
2 changes: 1 addition & 1 deletion quantecon/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
This is a VERSION file and should NOT be manually altered
"""
version = '0.1.9'
version = '0.1.10'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#-Write Versions File-#
#~~~~~~~~~~~~~~~~~~~~~#

VERSION = '0.1.9'
VERSION = '0.1.10'

def write_version_py(filename=None):
"""
Expand Down