lake_model_intro, time_series_with_matrices, long_run_growth: four small fixes
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- jupyter-notebook, matplotlib, numpy, python
- Domain
- data-visualization, documentation
Research direction
Read the three named lecture files at the referenced cells and lines: lake_model_intro.md, time_series_with_matrices.md, and long_run_growth.md. Check the stated parameter, plotting loop, sample construction, and country color mapping, then make the listed corrections. Done when T affects simulated paths, the plot mean and colors are computed as described, the dead guard is handled, and the notation reads e_0; leave the confirmed r(A) equation unchanged.
Written by the indexing model from the issue text.
Description
Four small things found while these lectures were reviewed on their way into the shared lecture pool (QuantEcon/lectures#42). None is urgent. Line numbers are at 530ede2.
lectures/lake_model_intro.md, line 96:$(u_0, e_o)$should read$(u_0, e_0)$.lectures/lake_model_intro.md,plot_time_paths(line 291): theTparameter is never used, because the loop callslm.simulate_path(x0=x)without it (line 338), soplot_time_paths(lm, T=...)changes nothing. The closingif ax is None: plt.show()(lines 359–360) never runs either, becauseaxwas already replaced by new axes when it wasNone(lines 314–315). The figure still appears in a notebook, so only the guard is dead.lectures/time_series_with_matrices.md, the# Plot meancell (line 467): each pass offor i in range(N)draws a fresh sample ofNpaths withseries_process.sample_y(N, rng=rng)(line 472) and plots only itsi-th row, so plotting 100 paths simulates 10,000, andμ_yis replotted on every pass. Drawing one sample before the loop and plotting the mean once gives the same picture. Separately,sample_y(line 437) could buildysas(b + us) @ A_inv.Trather than stacking one product per row.lectures/long_run_growth.md, thecolor_mappingcell (line 144):country_names = data['countrycode']holds one entry per row of the data, not per country, socm.tab20(np.linspace(0, 0.95, len(country_names)))(line 147) spaces the colours over every row, and the dictionary keeps the colour of each code's last row. The colours then depend on how many rows each country has.data['countrycode'].unique()gives one evenly spaced colour per country.
The same review also questioned r(A) = 1 + g at lake_model_intro.md line 272, but that is exact as written: every column of A sums to 1 + g.
When these land here, the pool picks them up through its nightly refresh.
- Dominant language
- Jupyter Notebook
- Stars
- 67
- Forks
- 33
- Avg merge
- 6h 22m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QuantEcon/lecture-python-intro
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
inequality's data.ipynb raises under the pinned pandas 3, and nothing runs it to noticePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
All issues in QuantEcon/lecture-python-intro
Similar issues
-
javascript metrics priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
LearningCircuit/local-deep-research#8334 ·
Maintainers usually reply within 1 day
-
Flare Refactor
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
conrad-blucher-institute/Flare#209 ·
Maintainers usually reply within 3 days
-
bug notebook mode
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
blixvip/NullMotion#31 ·
Maintainers usually reply within 1 day