Faster Python calculations with Numba
We’re heavy numba users at my company, and I’ve made a small contribution to the library. It’s a phenomenal library for developing novel computationally intensive algorithms on numpy arrays. In presentations, I’ve heard Leland McInnes credits numba often when he speaks of his development of UMAP.<p>We build a very computationally intensive portion of our application with it and it has been running in production, stable, for several years now.<p>It’s not suitable for all use cases. But I highly highly recommend it if you need to do somewhat complex calculations iterating over numpy arrays for which standard numpy or scipy functions don’t exist. Even then, often we were surprised that we could speed up some of those calculations by placing them inside numba.<p>Edit: ex of a very small function I wrote with numba that speeds up an existing numpy function (note - written years ago and numba has undergone quite some amount of changes since!): <a href="https:&#x2F;&#x2F;github.com&#x2F;grej&#x2F;pure_numba_alias_sampling" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;grej&#x2F;pure_numba_alias_sampling</a>