title: Is it possible to pass a numpy array by reference into a cpdef function?
body: <p>Is it possible to write a <strong>Cython</strong> function where a <strong>numpy array</strong> is passed <strong>by reference</strong> (perhaps a memory view?) and can I use such function in <strong>Python</strong>?</p>
  <p>I tried:</p>
  <pre><code>cpdef void my_function(bytes line, int&amp; counter, np.ndarray[np.uint32_t, ndim=2]&amp; sums):
      ...
      ...
  </code></pre>
  <p>Here <code>counter</code> and <code>sums</code> would be passed by reference. I am interested in the latter (but will happily accept critics and suggestions regarding both).</p>
  <p>The compiler throws:</p>
  <pre><code>Reference base type cannot be a Python object
  </code></pre>
  <p>I get the same message with <code>cdef</code> either and I don't understand the full etiology of the problem.</p>