Hi,
I wrote sample code and it works fine.
This is my code, in case anyone else want to know how to use it:
#include
#include "structmember.h"
#include
static PyObject *
print_a1(PyObject *dummy, PyObject *args)
{
npy_intp dims[3]; /* PyArray_AsCArray is for ndim <= 3 */
int typenum;
int
Hi,
Is the definition and explanation of PyArray_AsCArray in Numpy User
Guide up-to-date?
In the guide, it's like this:
int PyArray_AsCArray(PyObject** op, void* ptr, npy_intp* dims, int nd,
int typenum, int itemsize)
(http://docs.scipy.org/doc/numpy/reference/c-api.array.html?highlight=pyarray_a