Revise JAX intro lecture and add autodiff lecture#513
Conversation
- Fix coefficient mismatch in NumPy vs JAX function comparison - Update jax.random.PRNGKey to jax.random.key throughout - Add code-generated figures (PRNG key splitting tree, JIT pipeline) - Add vmap section with examples and transformation composition - Rework gradients section as autodiff preview with forward reference - Add autodiff lecture (adapted from lecture-jax) to TOC - Consolidate all imports into initial cell Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace artificial sum-of-squares vmap example with mean/median statistics - Add explanation of why Python loops are inefficient with JAX - Move all imports to initial cell per lecture conventions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix variable name typo (z_max_numpy → z_max_numba) - Fix vmap v2 print label - Fix garbled em dash - Consolidate imports to top of lecture - Use jnp.meshgrid instead of np.meshgrid for JAX arrays - Replace cm.jet with cm.viridis - Qualify JAX speed claim re GPU - Add overall recommendations section synthesizing trade-offs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Detailed changelog
|
|
@mmcky Do you have time to look at this? It would be great to get it live. |
Remove (jax_intro)= from jax_intro.md and (autodiff)= from autodiff.md. These labels duplicate the automatic :std:doc: targets created from the filenames, causing myst.xref_ambiguous warnings that fail CI with -W.
|
Reviewed all changes. The content additions look great — well-structured JAX intro revisions, solid new autodiff lecture, and useful improvements to the comparison lecture. CI fix applied (commit 3abf22a): Removed redundant (jax_intro)= and (autodiff)= MyST labels from jax_intro.md and autodiff.md. These labels duplicated the automatic :std:doc: targets created from the filenames, causing the myst.xref_ambiguous warning that failed CI with -W. Files reviewed: _toc.yml — autodiff placed correctly after numpy_vs_numba_vs_jax |
|
thanks @jstac this looks good to merge. |
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python-programming.zh-cn
|
✅ Translation sync completed (fa)Target repo: QuantEcon/lecture-python-programming.fa
|
Summary
0.1 * x**2vsx**2) in NumPy/JAX function comparison; updated deprecatedjax.random.PRNGKeytojax.random.keythroughoutvmapsection with mean/median example showing why Python loops are inefficient with JAX(jax_intro)=reference label, updated_toc.ymlTest plan
🤖 Generated with Claude Code