I'm trying to write a library in C which take in inputs a list of numpy array following the answer of this Calling C from Python: passing list of numpy pointers post. In my header file I include:
#include <Python/Python.h>
but when I call:
PyArray_DATA(PyList_GetItem(list,i))
where i
is an index that runs over the list's elements, I get a compilation error:
Implicit declaration of function 'PyArray_DATA' is invalid in C99
How can I fix it?
My xcode version is 10.1. I work with a script in Python 3.5 where my list of numpy array is created and use swig to interface with my C library.