Have a look at this post and think about the current code ;) https://stackoverflow.com/questions/7799977/numpy-vs-cython-speed