If I apply the patch below, then cython produces plain C for all of the inner loops in this file:

````patch
diff --git a/pyop2/computeind.pyx b/pyop2/computeind.pyx
index 41950e1..5f10313 100644
--- a/pyop2/computeind.pyx
+++ b/pyop2/computeind.pyx
@@ -9,15 +9,15 @@ ctypedef np.int_t DTYPE_t
 ctypedef unsigned int ITYPE_t
 cimport cython
 @cython.boundscheck(False)
-def compute_ind(np.ndarray[DTYPE_t, ndim=1] nums,
+def compute_ind(DTYPE_t[:] nums,
                 ITYPE_t map_dofs1,
                 ITYPE_t lins1,
                 DTYPE_t layers1,
-                np.ndarray[DTYPE_t, ndim=1] mesh2d,
-                np.ndarray[DTYPE_t, ndim=2] dofs not None,
-                A not None,
+                DTYPE_t[:] mesh2d,
+                DTYPE_t[:,:] dofs not None,
+                DTYPE_t[:,:] A not None,
                 ITYPE_t wedges1,
-                mapp,
+                DTYPE_t[:,:] mapp,
                 ITYPE_t lsize):
   cdef unsigned int count = 0
   cdef DTYPE_t m
@@ -27,7 +27,7 @@ def compute_ind(np.ndarray[DTYPE_t, ndim=1] nums,
   cdef unsigned int wedges = <unsigned int>wedges1
   cdef unsigned int lins = <unsigned int>lins1
   cdef unsigned int mm,d,i,j,k,l
-  cdef np.ndarray[DTYPE_t, ndim=1] ind = np.zeros(lsize, dtype=DTYPE)
+  cdef DTYPE_t[:] ind = np.zeros(lsize, dtype=DTYPE)
   cdef DTYPE_t a1,a2,a3
   cdef int a4
   cdef int len1 = len(mesh2d)
@@ -44,9 +44,9 @@ def compute_ind(np.ndarray[DTYPE_t, ndim=1] nums,
         if a4 != 0:
           len2 = len(A[d])
           for j in range(0, mesh2d[i]):
-            m = mapp[mm][c]
+            m = mapp[mm, c]
             for k in range(0, len2):
-              a3 = <DTYPE_t>A[d][k]*a4
+              a3 = <DTYPE_t>A[d, k]*a4
               for l in range(0,wedges):
                     ind[count + l * nums[2]*a4*mesh2d[i]] = l + m*a4*(layers - d) + a3 + offset
               count+=1
@@ -64,9 +64,9 @@ def compute_ind_extr(np.ndarray[DTYPE_t, ndim=1] nums,
                 DTYPE_t layers1,
                 np.ndarray[DTYPE_t, ndim=1] mesh2d,
                 np.ndarray[DTYPE_t, ndim=2] dofs not None,
-                A not None,
+                np.ndarray[DTYPE_t, ndim=2] A not None,
                 ITYPE_t wedges1,
-                mapp,
+                np.ndarray[DTYPE_t, ndim=2] mapp,
                 ITYPE_t lsize):
   cdef unsigned int count = 0
   cdef DTYPE_t m
@@ -92,9 +92,9 @@ def compute_ind_extr(np.ndarray[DTYPE_t, ndim=1] nums,
         if a4 != 0:
           len2 = len(A[d])
           for j in range(0, mesh2d[i]):
-            m = mapp[mm][c]
+            m = mapp[mm, c]
             for k in range(0, len2):
-              ind[count] = m*(layers - d) + <DTYPE_t>A[d][k] + offset
+              ind[count] = m*(layers - d) + <DTYPE_t>A[d,k] + offset
               count+=1
             c+=1
         elif dofs[i, 1-d] != 0:
@@ -111,13 +111,16 @@ def swap_ind_entries(np.ndarray[DTYPE_t, ndim=1] ind,
                     np.ndarray[int, ndim=1] my_cache,
                     ITYPE_t same):
   cdef unsigned int change = 0
+  cdef unsigned int lim
   cdef unsigned int found = 0
   cdef unsigned int i,j,m,l,n
   cdef unsigned int pos = 0
   cdef unsigned int swaps = 0
-  for i in range(k*map_dofs,lsize,map_dofs):
+  cdef unsigned int look_for
+  cdef unsigned int aux
+  for i from k*map_dofs <= i < lsize by map_dofs:
     lim = 0
-    for j in range(i,lsize,map_dofs):
+    for j from i <= j < lsize by map_dofs:
         if lim < ahead:
             found = 0
             for m in range(0,map_dofs):
@@ -167,10 +170,12 @@ def swap_ind_entries_batch(np.ndarray[DTYPE_t, ndim=1] ind,
   cdef unsigned int i,j,m,l,n
   cdef unsigned int pos = 0
   cdef unsigned int swaps = 0
-  for i in range(0, lsize, map_dofs):
+  cdef unsigned int look_for
+  cdef unsigned int aux
+  for i from 0 <= i < lsize by map_dofs:
     sw = i + map_dofs
     pos = 0
-    for j in range(i+map_dofs, lsize, map_dofs):
+    for j from i+map_dofs <= j < lsize by map_dofs:
             found = 0
             for m in range(0,map_dofs):
                 look_for = ind[j + m]
````