I'd skip this step and simply use cdef int[:, :], since accessing the elements is not time critical here. Also you should use Py_ssize_t and np.intp as data type.