
Using the wrapper class
static PyObject* gridloop2(PyObject* self, PyObject* args)
{
PyArrayObject *xcoor_, *ycoor_;
PyObject *func1, *arglist, *result;
/* arguments: xcoor, ycoor, func1 */
if (!PyArg_ParseTuple(args, "O!O!O:gridloop2",
&PyArray_Type, &xcoor_,
&PyArray_Type, &ycoor_,
&func1)) {
return NULL; /* PyArg_ParseTuple has raised an exception */
}
NumPyArray_Float xcoor (xcoor_); int nx = xcoor.size1();
if (!xcoor.checktype()) { return NULL; }
if (!xcoor.checkdim(1)) { return NULL; }
NumPyArray_Float ycoor (ycoor_); int ny = ycoor.size1();
// check ycoor dimensions, check that func1 is callable...
NumPyArray_Float a(nx, ny); // return array


