Jack Howarth <howarth.mailing.li...@gmail.com> wrote: > What is the correct coding to eliminate this error? I have found some > threads which seems to suggest that PyArray_DATA is still available in > numpy 1.9 as an inline but I haven't found any examples of projects > patching their code to convert to that usage.
In the deprecated API, PyArray_DATA is a macro. In the new API, PyArray_DATA is an inline function. While almost idential from the perspective of user code, the inline function has an argument with a type. Judging from the error message, the problem is that your NumPy array is represented by PyObject* instead of PyArrayObject*, and your C compiler says it cannot do the conversion automatically. The old macro version does the typecast, so it does not matter if you give it PyObject*. Solution? Use PyArrayObject* consistently in your code or typecast the PyObject* pointer on each function call to PyArray_DATA. Sturla _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion