Skip to content
Merged
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
6 changes: 3 additions & 3 deletions lectures/dyn_stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ We'll compute it two ways and get the same answer.
In addition to being a useful check on the accuracy of our coding, computing things in these two ways helps us think about the structure of the problem.

```{code-cell} python3
v_leader_forward = np.sum(βs * π_leader)
v_leader_forward = βs @ π_leader
v_leader_direct = -yt[:, 0].T @ P @ yt[:, 0]

# Display values
Expand Down Expand Up @@ -1380,8 +1380,8 @@ u2 = (- F2 @ z).flatten()
π_1 = p * q1 - γ * (u1) ** 2
π_2 = p * q2 - γ * (u2) ** 2

v1_forward = np.sum(βs * π_1)
v2_forward = np.sum(βs * π_2)
v1_forward = βs @ π_1
v2_forward = βs @ π_2

v1_direct = (- z[:, 0].T @ P1 @ z[:, 0])
v2_direct = (- z[:, 0].T @ P2 @ z[:, 0])
Expand Down
Loading