It just tells Cython that the memory in the underlying memory is laid out contiguously, so access to the array will be faster.

Actually, you do not need to create an intermediate Numpy array, `cdef Py_ssize_t[:] ddx = [1,-1,0,0,0,0]` should be enough...