short_path: the second and fourth figures show the wrong graphs

Đang mở Phù hợp với người mới
#884 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
86/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
jupyter-notebook, python
Lĩnh vực
content

Hướng nghiên cứu

Đọc lectures/_static/lecture_specific/short_path/figures.ipynb cùng với các tham chiếu đến hình trong lectures/short_path.md. Kiểm tra cách notebook đặt tên cho đường đi màu đỏ A, C, F, G và đồ thị J(v), rồi tạo lại các hình bị ảnh hưởng. Hoàn tất khi hình thứ hai và thứ tư khớp với phần văn bản xung quanh và cả hai vị trí đều có các hình đã được sửa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)

Ngôn ngữ chính
Jupyter Notebook
Star
71
Fork
37
Merge trung bình
13 giờ 9 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QuantEcon/lecture-python-intro

Tất cả issue của QuantEcon/lecture-python-intro

Issue tương tự

Thêm issue về Content

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.