short_path: the second and fourth figures show the wrong graphs

Aperta Adatta ai principianti
#884 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
jupyter-notebook, python
Ambito
content

Direzione di ricerca

Leggi lectures/_static/lecture_specific/short_path/figures.ipynb insieme ai riferimenti alle figure in lectures/short_path.md. Controlla come il notebook denomina il percorso rosso A, C, F, G e il grafo J(v), quindi rigenera le figure interessate. Il lavoro è terminato quando la seconda e la quarta figura corrispondono al testo circostante ed entrambi i siti contengono le figure corrette.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)

Lingua principale
Jupyter Notebook
Stelle
71
Fork
37
Merge medio
13h 9m
PR unite (30g)
8

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QuantEcon/lecture-python-intro

Tutte le issue di QuantEcon/lecture-python-intro

Issue simili

Altre issue su Content

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.