问题
I used python c api and wish to get an array back from python. I returned a python array from the python side and want to transfer the PyObject* result into a c array so I can use it.
Is there anyway I can do that?
Side questions: In what circumstance trying to return an element in the array like
return arr[3]
will cause the PyObject_callobject return NULL?
return arr
does give me something
来源:https://stackoverflow.com/questions/35141827/python-c-api-transfer-a-pyobject-into-c-array