~/talk

Making Computation Easier with Cool Numpy Tricks

Talkat PyData Los Angeles 2018 · 2018-10-17..10-19· [python, machine-learning]
slides:none on file

Demo shows concrete speedups and working code: creating a 100,000-element array takes ~1.04 ms vs ~5.2 ms in plain Python, summing takes ~462 µs vs ~19 ms, and averaging 443 µs vs 45 ms; it claims about an order of magnitude improvement. It uses broadcasting for elementwise ops, uses stride_tricks to create sliding windows as zero-copy views, and uses einsum to do fast reductions and a convolution built from stride views plus einsum that produces the expected 3×3 output (repo: https://github.com/kirit93/NumpyTutorial).

AI-written summary · about

  1. 0:00Introduction
  2. 2:26Basic Numpy
  3. 9:38Structured Numpy Array
  4. 11:43Broadcasting
  5. 19:03Fancy Indexing numpy
  6. 1:04:06Stride Tricks
  7. 1:12:30Einsum
  8. 1:23:47Convolution using stride tricks and einsum
~/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.