Attachment 'C_arraytest.h'
Download
Toggle line numbers
1 /* Header to test of C modules for arrays for Python: C_test.c */
2
3 /* ==== Prototypes =================================== */
4
5 // .... Python callable Vector functions ..................
6 static PyObject *vecfcn1(PyObject *self, PyObject *args);
7 static PyObject *vecsq(PyObject *self, PyObject *args);
8
9 /* .... C vector utility functions ..................*/
10 PyArrayObject *pyvector(PyObject *objin);
11 double *pyvector_to_Carrayptrs(PyArrayObject *arrayin);
12 int not_doublevector(PyArrayObject *vec);
13
14
15 /* .... Python callable Matrix functions ..................*/
16 static PyObject *rowx2(PyObject *self, PyObject *args);
17 static PyObject *rowx2_v2(PyObject *self, PyObject *args);
18 static PyObject *matsq(PyObject *self, PyObject *args);
19 static PyObject *contigmat(PyObject *self, PyObject *args);
20
21 /* .... C matrix utility functions ..................*/
22 PyArrayObject *pymatrix(PyObject *objin);
23 double **pymatrix_to_Carrayptrs(PyArrayObject *arrayin);
24 double **ptrvector(long n);
25 void free_Carrayptrs(double **v);
26 int not_doublematrix(PyArrayObject *mat);
27
28 /* .... Python callable integer 2D array functions ..................*/
29 static PyObject *intfcn1(PyObject *self, PyObject *args);
30
31 /* .... C 2D int array utility functions ..................*/
32 PyArrayObject *pyint2Darray(PyObject *objin);
33 int **pyint2Darray_to_Carrayptrs(PyArrayObject *arrayin);
34 int **ptrintvector(long n);
35 void free_Cint2Darrayptrs(int **v);
36 int not_int2Darray(PyArrayObject *mat);
New Attachment
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2006-12-13 18:39:14, 18.1 KB) [[attachment:C_arraytest.c]]
- [get | view] (2006-12-13 16:13:44, 18.1 KB) [[attachment:C_arraytest.c_v2]]
- [get | view] (2006-12-13 18:39:03, 1.4 KB) [[attachment:C_arraytest.h]]
- [get | view] (2006-12-13 16:13:23, 1.4 KB) [[attachment:C_arraytest.h_v2]]
- [get | view] (2006-12-13 16:14:10, 316.1 KB) [[attachment:Cext_v2.tar.gz]]