Repository navigation
Tags: QuantEcon/lecture-python-programming
Tags
[pandas_panel] Describe the single .replace() call, not a loop (#645) The pandas 3.0 update replaced the loop over continent names with one .replace() call taking the whole list, but the sentence above it still said we "loop through a list". Say what the code does, and end the sentence with a full stop. Intermediate publishes this lecture too; its copy takes the same change in QuantEcon/lecture-python.myst#1088, so the two stay byte-identical. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
⬆️ Bump dawidd6/action-download-artifact from 23 to 24 (#626) Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 23 to 24. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](dawidd6/action-download-artifact@v23...v24) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-version: '24' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Pin jax in the numpy_vs_numba_vs_jax install cell (#621) The workflow pin from #620 protects the build but not the reader. In CI the cell is a no-op because jax 0.11.0 is already installed, so pip treats the unpinned requirement as satisfied. In Colab nothing pre-satisfies it: a reader executing this notebook today resolves jax 0.11.1, then reaches the CPU-pinned lax.fori_loop and lax.scan cells at n = 10,000,000. jax 0.11.1 regresses XLA:CPU execution quadratically -- measured on linux x86_64, doubling n multiplies runtime by ~4.1 (fori) and ~4.0 (scan). At n=400,000 it is 105s against 0.005s under 0.11.0; extrapolated to the lecture's n=10,000,000 that is roughly 18 hours, which a reader experiences as a hang. Pinned to ==0.11.0 rather than !=0.11.1 deliberately: the regression is still present on jax main (nightly 0.11.2.dev20260819 measured at 96% of 0.11.1's time), so an exclusion would admit a likely-broken 0.11.2 without warning. This matches the exact version the six workflows install, so readers now run what CI runs. The other two jax cells in this repo are untouched: jax_intro.md loops to n=20 and autodiff.md has no lax loop, so neither reaches the regime. Lifting this pin is tracked alongside the workflow pins in QuantEcon/workspace-lectures#49. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI: prune the restored _build/html before building (#616) Mirrors QuantEcon/lecture-python-advanced.myst#374 — second repo of the nine in QuantEcon/workspace-lectures#41's scope. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Add language switcher support for fa, fr and zh-cn editions (#490) * Add language switcher config for fa and zh-cn Add `languages` and `current_language` to `html_theme_options` to enable the language switcher (globe icon) and SEO hreflang tags provided by quantecon-book-theme. Main already ships the 0.21.0 theme, so no environment change is needed here. Languages: - English (en) — https://python-programming.quantecon.org - فارسی (fa) — https://quantecon.github.io/lecture-python-programming.fa - 中文 (zh-cn) — https://quantecon.github.io/lecture-python-programming.zh-cn Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add French to the language switcher The .fr edition went live on 2026-07-17 at the default Pages URL, with no custom domain to reconcile. That resolves the deferral recorded on this PR in July, when French was left out because the site was not yet published and its URL would have been a guess. See the rollout tracker QuantEcon/project-translation#3. Ordered alphabetically by code after English; English stays first because the theme uses languages[0] for the hreflang x-default. Verified with a local build against quantecon-book-theme 0.21.0: the switcher lists all four languages with English active, and the hreflang alternates — including x-default — inject on every page. All 26 shared lecture pages resolve on the .fr site; polars is not yet synced there, as is also the case for .fa and .zh-cn. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Retire the last references to the retired lecture-python repo (#576) * Retire the last references to the retired lecture-python repo pandas_panel read all three of realwage.csv, countries.csv and employ.csv from QuantEcon/lecture-python — a repo last touched in January 2022 — even though this repo already has its own committed copies of all three under _static/lecture_specific/pandas_panel/. Now it reads its own. Verified byte-identical before repointing: each own-repo copy has the same sha256 as the legacy file it replaces, and the new URLs serve those same bytes, so lecture output cannot change. Mirrors QuantEcon/lecture-python.myst#968, which did the same for the myst series. With this, no English lecture source in the Python family points at the retired repo except lecture-stats. Interim by design: P2 of the datasets pilot migrates this trio to QuantEcon/data-lectures and will rewrite these three lines again — but it rewrites them either way, so this costs P2 nothing and stops the lecture depending on an unmaintained repo meanwhile. Part of QuantEcon/meta#337 See QuantEcon/meta#336 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Use this repo's existing raw.githubusercontent URL form Addresses Copilot review on #576. The repoint used github.com/.../raw/refs/heads/main/..., which introduced a third URL form into a repo that already had one: pandas.md and the other own-data reads all use raw.githubusercontent.com/.../main/.... Now all five own-data URLs match. Both forms fetch these files correctly — checked, they parse to identical frames — so this is about consistency, not correctness. Copilot's stated reason (that the redirect makes /raw/ less reliable for read_csv) does not hold; the redirect is real but pandas follows it. The one thing /raw/ buys is LFS safety: raw.githubusercontent.com serves pointer text rather than data for LFS-tracked files. That does not apply here — this repo has no .gitattributes, nothing is LFS — and these three files move to data-lectures under pilot P2 regardless, which is where the LFS-safe form actually matters. Part of QuantEcon/meta#337 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Adopt quantecon/actions/publish-gh-pages for GitHub Pages deploy (#568) * Adopt quantecon/actions/publish-gh-pages for GitHub Pages deploy Replaces the hand-rolled Pages deploy (configure-pages + upload-pages-artifact + deploy-pages) and inline release-asset packaging (tar/sha256/manifest -> softprops/action-gh-release) with a single quantecon/actions/publish-gh-pages@v0.8.0 step, matching the rest of the lecture family. Deploy-step only: the build, notebook sync, PDF/notebook and Netlify steps are unchanged. Part of QuantEcon/lectures#11. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Use bracket notation for the page-url output reference steps.deployment.outputs['page-url'] is the robust form for a hyphenated output key; addresses Copilot review feedback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
⬆️ Bump dawidd6/action-download-artifact from 20 to 21 (#543) Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 20 to 21. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](dawidd6/action-download-artifact@v20...v21) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-version: '21' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Misc changes to jax lectures (#533) * misc * misc * Fix call to add_tax_pure in jax_intro pure function example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PreviousNext