numpy#
Series: lecture-python-programming
File:
lectures/numpy.mdAudit date: 2026-05-28
Categories audited: writing, math, code, figures, references, links, admonitions (JAX out of scope)
Overall score: 7.7 / 10
Priority: LOW
Score breakdown#
Category |
Score |
One-line note |
|---|---|---|
Writing |
6.5/10 |
Heavily Title Case section headings; otherwise clean prose. |
Math |
7.5/10 |
Mostly clean; |
Code |
8/10 |
|
JAX |
out of scope |
— |
Figures |
7/10 |
Two |
References |
N/A |
No citations. |
Links |
9/10 |
Uses |
Admonitions |
8/10 |
Four |
Issues#
Critical#
None found.
High severity#
[qe-writing-006] — Section headings use Title Case rather than sentence case throughout. Examples: line 69
## NumPy Arrays, line 81### Basics, line 122### Shape and Dimension, line 161### Creating Arrays, line 222### Array Indexing, line 314### Array Methods, line 383## Arithmetic Operations, line 432## Matrix Multiplication, line 460## Broadcasting, line 836## Mutability and Copying Arrays, line 848### Mutability, line 890### Making Copies, line 922## Additional Features, line 927### Universal Functions, line 995### Comparisons, line 1047### Sub-packages, line 1085### Implicit Multithreading, line 1122## Exercises. Count: 18+ occurrences.
Medium severity#
[qe-code-003] — A duplicate
!pip install quanteconcell at line 1437 (insidenp_ex4) is redundant given the top-of-file install at line 35.[qe-fig-005] — Code-generated figures (e.g., exercise solutions) and the
{figure}at line 1109 lackname:metadata.
Low severity#
[qe-math-010 (proposed)] —
\mathbb Pwithout braces at line 1188; renders identically but inconsistent.[qe-admon-001] —
np_ex3uses bare{exercise}(line 1300) instead of gated syntax; body is prose-only so the violation is borderline.
Strengths#
Lecture title “NumPy” follows qe-writing-006.
No bold vectors, no
^Ttranspose, no*for multiplication, no\tag, noaligninside$$.Equation labels and
{eq}references used correctly (e.g.,np_polynomat line 1132 and{eq}ref at line 1137) per qe-math-013 (proposed).Crisp single-sentence paragraphs.
qe.Timerused in exercise per qe-code-004 (with custom message string).No
%timeitmagics (qe-code-005 compliant).Greek unicode (λ) used per qe-code-002.
Recommended actions#
Convert all section headings to sentence case (“NumPy arrays”, “Shape and dimension”, “Creating arrays”, “Array indexing”, “Array methods”, “Arithmetic operations”, “Matrix multiplication”, “Broadcasting”, “Mutability and copying arrays”, “Mutability”, “Making copies”, “Additional features”, “Universal functions”, “Comparisons”, “Sub-packages”, “Implicit multithreading”).
Remove the duplicate
!pip install quanteconcell at line 1437.Normalize
\mathbb P→\mathbb{P}.Optionally promote
np_ex3to gated{exercise-start}/{exercise-end}form for consistency.