Numba is a "just in time" (jit) compiler for python. It is designed to optimize floating point operations and loops which makes it ideal for scientific code. The simplest way to use it is to decorate you function as shown below, which instructs Numba to compile the function into fast machine code the first time it is called.
from numba import jit
@jit(nopython=True)
def dotproduct(v1, v2):
isum = 0.0