title: How to return an C array to Python?
body: <p>I wrote a Python/C extension function that was called by Python,  How can return an 2d array int[][] to Python?</p>
  
  <pre><code>static PyObject* inference_function(PyObject *self, PyObject *args)
  {
      PyObject* doc_lst;
      int K,V;
      double alpha,beta;
      int n_iter;
  
      if (!PyArg_ParseTuple(args, "Oiiddi", &amp;doc_lst, &amp;K,&amp;V, &amp;alpha,&amp;beta,&amp;n_iter))
      {
          printf("传入参数错误！\n");
          return NULL;
      }
  
     return Py_BuildValue("i", 1);
  }
  </code></pre>