~/talk

Vectorize using linear algebra and NumPy to make your Python code fast

Talkat PyCon US 2023 · 2023-04-19..04-27· [python]
slides:none on file

Shows how to replace Python loops and list-heavy implementations with NumPy vectorized operations to speed up code, using concrete linear-algebraic tricks. Begins from an inefficient algorithm implemented with loops, then iteratively replaces bottlenecks with NumPy operations while explaining the linear algebra reasons for the performance gains.

AI-written summary · about

  1. 0:00Start
  2. 2:46What is a vector?
  3. 4:47What is a matrix?
  4. 5:11Representations in NumPy
  5. 7:08Manhattan distance
  6. 15:12Getting rid of the nested for loop
  7. 15:58Doing the matrix subtraction in one pass
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.