Numba is an just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM (through decorators). Its goal is to seamlessly integrate with the Python scientific software stack and produce optimized native code, as well as integrate with native foreign languages.
from numba import jit from numpy import arange # jit decorator tells Numba to compile this function. # The argument types will be inferred by Numba when function is called. @jit def sum2d(arr): M, N = arr.shape result = 0.0 for i in range(M): for j in range(N): result += arr[i,j] return result a = arange(9).reshape(3,3) print(sum2d(a))
More examples: examples.
$ git clone git://github.com/numba/numba.git
For tarballs see:
The easiest way to install numba and get updates is by using the Anaconda Distribution: http://continuum.io/downloads.html
If you have anaconda installed already:
$ conda install numba
$ conda update numba
For custom python environments see:
Join the numba mailing list email@example.com :
Some old archives are at:
See if our sponsor can help you (which can help this project):