Making computation easier with cool Numpy tricks
summary
Concrete claims and demos: Numpy yields real speedups (range/sum benchmarks show Python lists several times slower—examples ~6x and ~36x), and some routines (dot/transpose/view) avoid copies. Actual tools shown include broadcasting rules with worked shapes, stride_tricks sliding windows that build windows without copying, and einsum for memory‑efficient contractions. Examples include a convolution built from stride views plus einsum, memmap for a 10,000×10,000 file, and a mixin pattern to enforce a probability‑sum constraint — all shown working end‑to‑end.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:12Why NumPy is essential for AI
- 2:43Array creation techniques
- 7:46NumPy broadcasting rules
- 12:39Advanced indexing and manipulation
- 28:57NumPy stride tricks
- 47:55Einstein summation for efficiency
- 1:01:30Implementing convolution with NumPy
- 1:10:47Custom NumPy mix-ins
- 1:22:38Memory-mapped files in NumPy
- 1:26:32Q&A
related talks
01h 31mMaking Computation Easier with Cool Numpy Tricks
27mAPL-Inspired Techniques for Advanced NumPy
34mNumPy: vectorize your brain
22mSupercharge Scientific Computing in Python with Numba
37mUsing Numba Effectively Today
35mVectorization: How slow Python runs fast code
34mAccelerating GPU Algorithms in pure Python
37mAccelerating Scientific Computing in Python with Numba: A Real-World Example
