Re: [Numpy-discussion] PyArray_AsCArray (cfunction, in Array API) in Numpy User Guide

2009-09-21 Thread Takafumi Arakaki
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

[Numpy-discussion] PyArray_AsCArray (cfunction, in Array API) in Numpy User Guide

2009-09-20 Thread Takafumi Arakaki
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