Repository navigation
Recover six small gaps: five state-file advances and harrison_kreps' la.solve port - #301
Conversation
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
…tate 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 <noreply@anthropic.com>
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🟢 Approval recommended
The only code change is a verified mathematically-equivalent la.solve port with correct comments, and the remaining changes are low-risk state-file metadata advances consistent with the documented convention.
No open issues 🎉
What changed in this PR
This PR recovers six small gaps identified in issue #298 without regenerating any lecture. Five translated lectures (career, jv, odu, mccall_q, likelihood_bayes) already carried their source content changes but had stale .translate/state tracking files, so only their source-sha/synced-at are advanced. The sixth, harrison_kreps, needed a seven-line code port backporting the upstream refactor from an explicit matrix inverse (la.inv) to a linear solve (la.solve), which is mathematically equivalent (prices = β·(I−βP)⁻¹·P·d ⇒ solve(I−βP, β·P·d)).
Changes:
- Port
price_single_beliefsinharrison_kreps.mdfromla.inv(...) @ ...tola.solve(A, b), with translated comments. - Advance
source-shaandsynced-aton five state files, preservingmodel/mode/section-count.
| File | Description |
|---|---|
lectures/harrison_kreps.md |
Rewrites price_single_beliefs to use la.solve; equivalent result, correct translated comments. |
.translate/state/harrison_kreps.md.yml |
Advances state to the source sha carrying the la.solve refactor. |
.translate/state/likelihood_bayes.md.yml |
Advances source-sha to 06c784f5… (matches PR #248's source commit). |
.translate/state/career.md.yml |
Advances state sha for the Job Search renumbering (H1-only source change). |
.translate/state/jv.md.yml |
Advances state sha for the Job Search renumbering. |
.translate/state/odu.md.yml |
Advances state sha for the Job Search renumbering (mode: RESYNC preserved). |
.translate/state/mccall_q.md.yml |
Advances state sha; content (H1, default_rng, typos) already present. |
Review effort: Balanced
Part of #298: the six small gaps, recovered without regenerating any lecture. Five lectures already carry their source change and only their
.translate/statesha was stale; one needed a seven-line code port.career,jv,odumccall_qdefault_rngand typo/legend changes are present toolikelihood_bayesnp.randomseed →default_rngharrison_krepsla.solve(its sync failed before filing anything)Each was re-verified on 2026-10-22 against the source diff between its old state sha and the file's current sha. The 2026-10-18 truth table had
mccall_qdown forforward -f; the diff shows only the H1 outstanding. State-only changes advancesource-shaand stampsynced-at, leavingmodel,mode,section-countandtool-versionas they were (the convention of QuantEcon/lecture-python-programming.fa#160).Checks.
harrison_kreps's code matches the source (ASTs with string literals masked) and the lecture executes locally with numerical output identical to the English.translate statusat v0.29.6 against lecture-python.mystmainreports all sixALIGNED.What #298 still has after this: the lectures in #286, #294 and #296;
measurement_models(no human edits, so a freshinit -f); andsir_model,svd_intro,var_dmd, which carry the zh-cn editors' work and whose route is still open.🤖 Generated with Claude Code