Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Numpy, the Python foundation for number crunching
Search
Data Science London
November 12, 2012
Technology
5k
1
Share
Numpy, the Python foundation for number crunching
Talk by Didrik Pinte, MD at Enthought at Data Science London meetup 18/10/12
Data Science London
November 12, 2012
More Decks by Data Science London
See All by Data Science London
Semi-Supervised Anomaly Detection
datasciencelondon
0
1.1k
Hacking the Rail: Ingesting, analysing & visualising realtime streaming data
datasciencelondon
1
47k
Stateful Data-Parallel Processing
datasciencelondon
0
47k
Semantic web warmed up: Ontologies for the IoT
datasciencelondon
0
130
IoT data ingestion pipelines and Clojure transducers
datasciencelondon
0
290
TrendCalculus: A data science for trends
datasciencelondon
1
48k
Data Science in Mobile Health
datasciencelondon
1
8.3k
Large-scale Recommender Systems on Just a PC (with GraphChi)
datasciencelondon
1
17k
Taming Graph Dynamics at Scale
datasciencelondon
0
8.2k
Other Decks in Technology
See All in Technology
非同期・イベント駆動処理の分散トレーシングの繋げ方
ichikawaken
1
260
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
5
1.7k
ZOZOTOWNリプレイスでのSkills導入までの流れとこれから.pptx.pdf
zozotech
PRO
2
320
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
140
AI時代のIssue駆動開発のススメ
moongift
PRO
0
360
Microsoft Fabricで考える非構造データのAI活用
ryomaru0825
0
630
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
330
"まず試す"ためのDatabricks Apps活用法 / Databricks Apps for Early Experiments and Validation
nttcom
1
120
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
140
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
77k
スケーリングを封じられたEC2を救いたい
senseofunity129
0
140
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
180
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
990
Crafting Experiences
bethany
1
100
Writing Fast Ruby
sferik
630
63k
Tell your own story through comics
letsgokoyo
1
880
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
700
How GitHub (no longer) Works
holman
316
150k
Scaling GitHub
holman
464
140k
Building an army of robots
kneath
306
46k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Transcript
Numpy, the Python foundation for number crunching Didrik Pinte, Enthought
London Data Science meetup Monday 22 October 2012
Number crunching? •High-level api •Interactivity & visualization •Performance •Low-level access
Monday 22 October 2012
Evidence ? PyCuda PyTrilinos Joblib petsc4py PyAlgoTrade numpy-boost Clyther PyOpenGL
Monday 22 October 2012
Evidence ? PyCuda PyTrilinos Joblib petsc4py PyAlgoTrade numpy-boost Clyther PyOpenGL
Monday 22 October 2012
Why then? •The API ... •Simple but powerful memory model
•Open access to the data Monday 22 October 2012
Array data structure Monday 22 October 2012
Let’s look at the code! •Examples: – API / interactivity
– memory management with stride_tricks – pikos – extensions with talib –(joblib, memmap/multiprocessing, ipython //) Monday 22 October 2012
API / interactivity Monday 22 October 2012
Memory management 1 2 3 4 5 6 7 8
9 10 1 2 3 4 2 3 4 5 3 4 5 6 12 11 = 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 ... Monday 22 October 2012
Memory management 1 2 3 4 5 6 7 8
9 10 1 2 3 4 2 3 4 5 3 4 5 6 12 11 = Shape 12, Strides 8, Shape 9,4, Strides 8,8 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 ... Monday 22 October 2012
Memory management - pikos Monday 22 October 2012
Memory management - chaco Monday 22 October 2012
Low level access %timeit talib.moving_average(adj_close, optInTimePeriod=5) 100000 loops, best of
3: 7.67 us per loop %timeit as_strided(adj_close, shape=(len(adj_close)-4, 5), strides=(8, 8)).mean (axis=1) 10000 loops, best of 3: 28.2 us per loop Monday 22 October 2012
Conclusion •It’s obvious, no? Monday 22 October 2012
Q & A ? Monday 22 October 2012