From d9579289b18e20b20d69e87cdbd103b9f5a6e82e Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 22 Oct 2026 10:22:55 +1100 Subject: [PATCH 1/3] Advance four state files whose lectures already carry the source change career, jv and odu: QuantEcon/lecture-python.myst#760 changed only the H1 in each (Job Search renumbering), and #273 applied it here. The H1s on main already read VII, VIII and IX. likelihood_bayes: QuantEcon/lecture-python.myst#977 replaced the global np.random seed with default_rng; #248 delivered that change, and the file uses np.random.default_rng(142857) at the same two sites as the source, but the state kept the older sha. source-sha advanced to each file's last source commit and synced-at stamped; model, mode, section-count and tool-version are left as they were, since nothing was regenerated (the fa#160 convention). `translate status` at v0.29.6 now reports all four ALIGNED. Co-Authored-By: Claude Opus 5.5 --- .translate/state/career.md.yml | 4 ++-- .translate/state/jv.md.yml | 4 ++-- .translate/state/likelihood_bayes.md.yml | 4 ++-- .translate/state/odu.md.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.translate/state/career.md.yml b/.translate/state/career.md.yml index f05545de..50dc92f9 100644 --- a/.translate/state/career.md.yml +++ b/.translate/state/career.md.yml @@ -1,5 +1,5 @@ -source-sha: a4fbd8653600ac99163bfd5d4f7d98c1e613042e -synced-at: "2026-07-26" +source-sha: 0d8ef6103a5a1a5a340dc3bbddb8899a07645b09 +synced-at: "2026-10-22" model: claude-sonnet-5 mode: UPDATE section-count: 4 diff --git a/.translate/state/jv.md.yml b/.translate/state/jv.md.yml index fbfe852e..22d7070c 100644 --- a/.translate/state/jv.md.yml +++ b/.translate/state/jv.md.yml @@ -1,5 +1,5 @@ -source-sha: a4fbd8653600ac99163bfd5d4f7d98c1e613042e -synced-at: "2026-07-26" +source-sha: 0d8ef6103a5a1a5a340dc3bbddb8899a07645b09 +synced-at: "2026-10-22" model: claude-sonnet-5 mode: UPDATE section-count: 5 diff --git a/.translate/state/likelihood_bayes.md.yml b/.translate/state/likelihood_bayes.md.yml index 74fd0fd3..96be5cd3 100644 --- a/.translate/state/likelihood_bayes.md.yml +++ b/.translate/state/likelihood_bayes.md.yml @@ -1,5 +1,5 @@ -source-sha: 07975d502f57b29b4aa331a71c0afa6809dee369 -synced-at: "2026-08-19" +source-sha: 06c784f5e5939bd1379adeb2289488d84dfa7c8d +synced-at: "2026-10-22" model: claude-sonnet-5 mode: UPDATE section-count: 8 diff --git a/.translate/state/odu.md.yml b/.translate/state/odu.md.yml index 5bf4f446..1d5306ac 100644 --- a/.translate/state/odu.md.yml +++ b/.translate/state/odu.md.yml @@ -1,5 +1,5 @@ -source-sha: 78030a3a27f6527046675bcd8a8d27995ca25af6 -synced-at: "2026-07-18" +source-sha: 0d8ef6103a5a1a5a340dc3bbddb8899a07645b09 +synced-at: "2026-10-22" model: claude-sonnet-5 mode: RESYNC section-count: 12 From 88f4ea214135464d2623673c534e1253d48549b7 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 22 Oct 2026 10:25:08 +1100 Subject: [PATCH 2/3] Advance mccall_q's state file too: its one outstanding change is applied MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The state sha is 46cf999 (QuantEcon/lecture-python.myst#624). The only later source change is QuantEcon/lecture-python.myst#760, which changed just the H1 (Job Search IX -> X); #273 applied it, and the H1 here reads 工作搜寻 X. The earlier default_rng change (QuantEcon/lecture-python.myst#959) and QuantEcon/lecture-python.myst#624's typo, legend and loop-guard edits are present. Co-Authored-By: Claude Opus 5.5 --- .translate/state/mccall_q.md.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.translate/state/mccall_q.md.yml b/.translate/state/mccall_q.md.yml index 19de1e97..b95228b0 100644 --- a/.translate/state/mccall_q.md.yml +++ b/.translate/state/mccall_q.md.yml @@ -1,5 +1,5 @@ -source-sha: 46cf999fa492255058c67e132b99735a7cb5fbaa -synced-at: "2026-08-05" +source-sha: 0d8ef6103a5a1a5a340dc3bbddb8899a07645b09 +synced-at: "2026-10-22" model: claude-sonnet-5 mode: UPDATE section-count: 7 From 4fcb32200a9536497d2cd7ba23f5b9f1a9d73fb0 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 22 Oct 2026 10:26:23 +1100 Subject: [PATCH 3/3] harrison_kreps: port the la.solve refactor by hand, and advance its state QuantEcon/lecture-python.myst#669 replaced the explicit inverse in price_single_beliefs with a linear solve. Its sync failed before it could file anything (a missing anthropic-api-key input on 2026-08-05), so the change never arrived. The source diff is seven lines of code in one cell, so it is ported by hand rather than regenerating a lecture the zh-cn editor has worked on: the code is the source's, and the three comments are translated as this edition translates code comments. The cell's code now matches the source (ASTs with string literals masked); the lecture executes with numerical output identical to the English. source-sha advanced and synced-at stamped; model, mode, section-count and tool-version unchanged, as nothing was regenerated. Co-Authored-By: Claude Opus 5.5 --- .translate/state/harrison_kreps.md.yml | 4 ++-- lectures/harrison_kreps.md | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.translate/state/harrison_kreps.md.yml b/.translate/state/harrison_kreps.md.yml index 3a6e0404..9266ef65 100644 --- a/.translate/state/harrison_kreps.md.yml +++ b/.translate/state/harrison_kreps.md.yml @@ -1,5 +1,5 @@ -source-sha: 01e6f828d55d38d1ec82684b24fbb4e2a943de30 -synced-at: "2026-08-05" +source-sha: 15d4f054f7663e4e6d9745d25636357526da8514 +synced-at: "2026-10-22" model: claude-sonnet-5 mode: UPDATE section-count: 4 diff --git a/lectures/harrison_kreps.md b/lectures/harrison_kreps.md index 39a5dfb2..cf701b4f 100644 --- a/lectures/harrison_kreps.md +++ b/lectures/harrison_kreps.md @@ -292,11 +292,14 @@ def price_single_beliefs(transition, dividend_payoff, β=.75): """ 求解单一信念的函数 """ - # 首先计算逆矩阵部分 - imbq_inv = la.inv(np.eye(transition.shape[0]) - β * transition) + # 首先计算 (I - βQ) + A = np.eye(transition.shape[0]) - β * transition - # 接下来计算价格 - prices = β * imbq_inv @ transition @ dividend_payoff + # 接下来计算 βQd + b = β * (transition @ dividend_payoff) + + # 求解线性方程组 + prices = la.solve(A, b) return prices ```