short_path: the second and fourth figures show the wrong graphs

未關閉 適合新手
#884 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
86/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
jupyter-notebook, python
領域
content

研究方向

將 lectures/_static/lecture_specific/short_path/figures.ipynb 與 lectures/short_path.md 中的圖引用一起閱讀。檢查筆記本如何命名紅色的 A、C、F、G 路徑和 J(v) 圖,然後重新產生受影響的圖。第二幅和第四幅圖與周圍文字相符,且兩個位置都包含修正後的圖,即為完成。

由索引模型根據 Issue 內容生成。

描述

What readers see. On https://intro.quantecon.org/short_path.html, two of the four figures don't match the text around them:

  • after "A, C, F, G at cost 8", the page shows a graph with its edges shaded in blues, where the text expects the path A, C, F, G highlighted in red;
  • after "Suppose that we know $J(v)$ for each node $v$, as shown below", the page shows that red A, C, F, G path, where the text expects the graph labelled with $J(v)$ at each node (8 at A, 10 at B, 3 at C, 5 at D, 4 at E, 1 at F, 0 at G).

The first and third figures (the plain graph, and the path A, D, F, G in blue) are right.

Why. lectures/_static/lecture_specific/short_path/figures.ipynb writes the red A, C, F, G path to graph2.png, the blues-shaded graph to graph4.png and the $J(v)$ figure to graph5.png. lectures/short_path.md uses the earlier numbering, which QuantEcon/lecture-python.myst's copy of these figures still follows: the red path as graph4.png (its second {figure}) and the $J(v)$ figure as graph2.png (its fourth). The figures were regenerated with the notebook's numbering, so the lecture's second and fourth references now name the wrong files, and graph5.png was never committed.

Fix (either way, one pull request). Change the notebook to write the red path to graph4.png and the $J(v)$ figure to graph2.png, regenerate, and commit those two files, leaving the lecture's text as it is. Or point the lecture's second figure at graph2.png and its fourth at a committed graph5.png. The first keeps the file names that QuantEcon/lecture-python.myst and QuantEcon/lecture-dp use.

Found by a screenshot comparison of the Dynamic Programming lectures before their move to QuantEcon/lectures (QuantEcon/project-monorepo#85). Those lectures republish this lecture and currently serve the right figures, from older copies; the monorepo's pool holds this repository's files, so the fix here reaches both sites.

Claude Code (on behalf of mmcky)

主要語言
Jupyter Notebook
星號
71
分支
37
平均合併
13 小時 9 分鐘
30 天內合併 PR
8

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

QuantEcon/lecture-python-intro 的其他 Issue

查看 QuantEcon/lecture-python-intro 的全部 Issue

相似的 Issue

更多 Content Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。