The problem
Twelve notebooks about the shape of data, and almost nothing is ever drawn. matplotlib appears in exactly three places and all three are commented out:
scripts/content.py:639 — §04, "Optional, and worth doing once", showing the reshape-vs-transpose scramble
scripts/content.py:1317 — §09, original / sobel / blurred side by side
scripts/content.py:1656 — §11, the PCA scatter
The §04 one is the clearest loss. The entire section argues that reshape and transpose give identical shapes and completely different data — and the one thing that makes that undeniable in half a second, seeing the scrambled image, is behind a comment marker that most students will not uncomment.
The ask
One visual per notebook. A plot where a plot is the point; an ipywidgets slider where interaction is the point. Not decoration — each one should replace a paragraph of explanation.
Take these as a starting list, not a specification. If a section is better served by no plot, say so and tick it off.
Constraints — this one touches every file, so read carefully
- All twelve edits are in
scripts/content.py. The .ipynb files are generated by scripts/gen_notebooks.py; hand-editing them is caught by CI (which reruns both generators and fails if the tree changes) but only after you push.
- No committed outputs.
scripts/check_links.py fails on any cell with outputs or an execution count. A widget that renders only when executed is fine; a widget whose state gets serialised into the .ipynb on save is not. Check git diff --stat before committing — a stray figure or widget blob shows up as a suspiciously large diff on a file you only added ten lines to.
ipywidgets in Colab: works, but some widget types need google.colab.output.enable_custom_widget_manager() first. Put that in the cell with a comment rather than assuming the student's runtime is configured. Students are on Colab, not local Jupyter — test there.
- Nothing here changes the built site.
_quarto.yml serves notebooks/*.ipynb as raw resources:, never rendered — Quarto does not execute them. So CI checks validity and nothing more. The only real verification is opening a couple in Colab and clicking the sliders.
- Bilingual prose on every new markdown cell — 🇪🇸 blockquote alongside the English, matching the existing pattern.
uv run --with pyyaml,nbformat python scripts/gen_notebooks.py
uv run --with pyyaml,nbformat python scripts/check_links.py --notebooks-only
Please split this up
Twelve sections in one PR is unreviewable and will sit open. Several PRs, grouped by two or three sections each. The three already-written-but-commented-out figures (§04, §09, §11) are a good first PR on their own — small, obviously correct, and it unblocks the pattern for the rest.
The problem
Twelve notebooks about the shape of data, and almost nothing is ever drawn. matplotlib appears in exactly three places and all three are commented out:
scripts/content.py:639— §04, "Optional, and worth doing once", showing the reshape-vs-transpose scramblescripts/content.py:1317— §09, original / sobel / blurred side by sidescripts/content.py:1656— §11, the PCA scatterThe §04 one is the clearest loss. The entire section argues that
reshapeandtransposegive identical shapes and completely different data — and the one thing that makes that undeniable in half a second, seeing the scrambled image, is behind a comment marker that most students will not uncomment.The ask
One visual per notebook. A plot where a plot is the point; an
ipywidgetsslider where interaction is the point. Not decoration — each one should replace a paragraph of explanation.content.py:639) and make it non-optionalcontent.py:1317), plus a slider over kernel sizek(pairs with PCA is not a factorization — remove it from the map of factorizations #4)content.py:1656); scree plot showing the standardisation trapTake these as a starting list, not a specification. If a section is better served by no plot, say so and tick it off.
Constraints — this one touches every file, so read carefully
scripts/content.py. The.ipynbfiles are generated byscripts/gen_notebooks.py; hand-editing them is caught by CI (which reruns both generators and fails if the tree changes) but only after you push.scripts/check_links.pyfails on any cell with outputs or an execution count. A widget that renders only when executed is fine; a widget whose state gets serialised into the.ipynbon save is not. Checkgit diff --statbefore committing — a stray figure or widget blob shows up as a suspiciously large diff on a file you only added ten lines to.ipywidgetsin Colab: works, but some widget types needgoogle.colab.output.enable_custom_widget_manager()first. Put that in the cell with a comment rather than assuming the student's runtime is configured. Students are on Colab, not local Jupyter — test there._quarto.ymlservesnotebooks/*.ipynbas rawresources:, never rendered — Quarto does not execute them. So CI checks validity and nothing more. The only real verification is opening a couple in Colab and clicking the sliders.Please split this up
Twelve sections in one PR is unreviewable and will sit open. Several PRs, grouped by two or three sections each. The three already-written-but-commented-out figures (§04, §09, §11) are a good first PR on their own — small, obviously correct, and it unblocks the pattern for the rest.