#numpy
2 articles
01
·Linear Algebra·FREE·10 min read
Tensors and Shape Manipulation — If You Can Read einsum, You Can Read Papers
The Σ_j A_ij B_jk in the paper and the x.transpose(1,2) in the code say the same thing, and einsum is the bridge between them. Three tools — axes, broadcasting, contraction — are enough to write attention in a single line.
02
·Compilers & Runtimes·★ MEMBER·11 min read
Why Python Is Slow — Said Precisely
Saying Python is slow bundles three unrelated complaints: the cost of a single operation, the way data is laid out in memory, and the fact that CPU work does not spread across threads. Objects and the eval loop, the real reason NumPy is fast, what the GIL actually protects, and how far free-threaded builds since PEP 703 get you — from zero assumed knowledge.