sympy#
Series: lecture-python-programming
File:
lectures/sympy.mdAudit date: 2026-05-28
Categories audited: writing, math, code, figures, references, links, admonitions (JAX out of scope)
Overall score: 7.2 / 10
Priority: LOW
Score breakdown#
Category |
Score |
One-line note |
|---|---|---|
Writing |
7/10 |
Some H2 in sentence case; H3 mostly sentence case; H2 stragglers remain. |
Math |
6/10 |
Bare |
Code |
8/10 |
Only Anaconda packages (sympy, numpy, matplotlib); Greek unicode (λ) used as a SymPy |
JAX |
out of scope |
— |
Figures |
N/A |
No matplotlib figures (SymPy’s own |
References |
N/A |
No citations. |
Links |
7/10 |
Two bare URLs to sibling series. Examples: line 200 |
Admonitions |
8/10 |
Two |
Issues#
Critical#
None found.
High severity#
[qe-link-002] — Three bare URLs to sibling lecture series. Examples: line 200 (
python.quantecon.org/complex_and_trig.html), line 313 (intro.quantecon.org/geom_series.html), line 664 (python.quantecon.org/mle.html) — should use{doc}`intermediate:complex_and_trig`,{doc}`intro:geom_series`,{doc}`intermediate:mle`. Count: 3 occurrences.
Medium severity#
[qe-writing-006] — A few H2 headings use Title Case. Examples: line 45
## Getting Started, line 371## Symbolic Calculus, line 470## Plotting, line 515## Application: Two-person Exchange Economy, line 610## Exercises. Count: 5 occurrences.[qe-math-010 (proposed)] — Bare
E(X)used for expectation rather than\mathbb{E}[X]. Example: line 349E(X) = \sum_{x=0}^{\infty} x f(x). Count: 1 occurrence in display math (plusE(X)echoed at line 368 in code — but that is a SymPyEsymbol, which is intentionally whatfrom sympy.stats import Eprovides).
Low severity#
[qe-writing-004] — Mixed casing inside
## Application: Two-person Exchange Economy(line 515).[qe-code-001] —
from sympy import *(line 50) is a star-import; common in SymPy tutorials but discouraged by PEP8.[qe-admon-001] — Two exercises use bare
{exercise}rather than gated syntax (lines 612, 661); bodies are prose-only.
Strengths#
Lecture title “SymPy” follows qe-writing-006.
Many H2 headings already use sentence case (“Symbolic algebra”); H3 mostly sentence case.
Lowercase
ffor densities/PMFs per qe-math-015 (proposed) (lines 323, 412).Sequences correctly use
\{...\}(e.g.,\{\xi_t\}) per qe-math-005.Greek unicode (λ) used as a SymPy
Symbolper qe-code-002.Exercise/solution pairs use
:class: dropdownand:label:per qe-admon-002/qe-admon-005.
Recommended actions#
Convert the three bare quantecon.org URLs (lines 200, 313, 664) to
{doc}cross-series links.Convert remaining Title Case H2 headings to sentence case (“Getting started”, “Symbolic calculus”, “Application: two-person exchange economy”).
Replace narrative
E(X) = \sum ...with\mathbb{E}[X] = \sum ...(the SymPy codeE(X)may remain since it’s the SymPy function name).Optionally replace
from sympy import *with explicit named imports.