Accelerating Python code with Cython