Speeding up scientific code with Cython and numba