2 Oct 2002 20:32
calling multiarraymodule.c funcs from c api
John Hunter <jdhunter <at> ace.bsd.uchicago.edu>
2002-10-02 18:32:28 GMT
2002-10-02 18:32:28 GMT
I am new to numpy extension writing, and am trying to call some of the
functions defined in Numeric-21.3/Src/multiarraymodule.c, eg
extern PyObject *PyArray_Correlate(PyObject *op1, PyObject *op2, int mode)
in a Numeric extension module that I am writing.
Are these functions available via the C API, and if so, how should I
go about accessing them? Or are the only array functions defined in
Include/arrayobject.h available in the C API?
Below is my prototype module. I am defining a function 'xcorr' that
just does what cross_correlate does, as a test case to see if I can
access the multiarray C API:
/* jdhscipy.c -- Wed Oct 2 2002
*/
#include "Python.h"
#include "Numeric/arrayobject.h"
#include "stdio.h"
static PyObject *ErrorObject;
extern PyObject *PyArray_Correlate(PyObject*, PyObject*, int);
static char xcorr__doc__[] = "";
static PyObject * xcorr(PyObject *self, PyObject *args) {
PyObject *shape, *a0;
int mode=0;
(Continue reading)
RSS Feed