Kernels in Cython