title: Speed up for-loop in Cython
body: <p>I am still at the beginning to understand how Cython works.
  This snippet shows one of the slow parts of my program and I am wondering whether this for loop can be improved.
  It still pretty much looks like the original Numpy version, but I added the cdef's and int-conversion.</p>
  
  <pre><code>cdef Py_ssize_t i, j
  cdef double ii, jj
  
  for ii in np.arange(startx, endx+1, 0.1):
      for jj in np.arange(starty, endy+1, 0.1):
          if my_condition(ii, jj):
              i = &lt;int&gt;ii
              j = &lt;int&gt;jj
              data[i, j] += 1
  </code></pre>
  
  <p>Do you have any recommendations?</p>