> I'd be worried that the cost of two Python function calls > for every iteration would swamp any gains made from doing > the looping part in Cython. Well, the do_curvature call is a call to a SWIG wrapped module. The call is really quick. What's slowing down is the python for loops, not the call.