I am converting a computational C program to Python with using PyArray_SimpleNew() to create a numpy array in C. However, i get warning
C4055:: from data pointer 'void *' to function pointer 'PyObject *(__cdecl *)
Here is an extraction of the relevant code:
PyObject* myArray=NULL;
npy_int nd=1;
npy_int dims[1]={10};
myArray=PyArray_SimpleNew(nd,dims,NPY_UINT64)
the warning happens at the last line. After some google searches, it suggests that it's due to an improper implementation in Numpy library that violates C standards.
So my questions are,
1.Could anyone explain what's happening here? Especially where that "void*" comes from? 2.Does this warning really matters in this use case? Would it be safe to suppress it?
some reference:
http://docs.scipy.org/doc/numpy/reference/c-api.array.html Pointer-type mismatch with PyArray_SimpleNew