O'Reilly logo

IPython Notebook Essentials by L. Felipe Martins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accelerating computations with Numba and NumbaPro

In this section, we will discuss Numba and NumbaPro, two very exciting libraries to accelerate the NumPy code. Numba and NumbaPro were created by Continuum Analytics, the same company that produces the Anaconda distribution. Numba is part of the standard Anaconda distribution, but NumbaPro is a commercial product that must be purchased separately as part of the Accelerate package. However, NumbaPro can be downloaded for a free trial period.

These libraries are unique in that they allow the acceleration of code with the addition of a few lines of code. As the first example, let's consider the following lines of code to multiply two matrices:

def matrix_multiply(A, B):
    m, n = A.shape
 n, r = B.shape ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required