Hello Cython list,
I am trying to create a generic loop function for building UFuncs, and when
I try to compile the following code, I get an error:
from numpy cimport *
cdef void PyUFunc_i_d(char *args, npy_intp *dimensions, npy_intp *steps,
void *extra):
cdef npy_intp i
cdef npy_intp is1 = steps[0],
cdef npy_intp os = steps[1], n = dimensions[0]
cdef char *i1 = args[0], *op = args[1]
for i in range(n):
*(<double *>op) = (*extra <double(*)(int)> ) ( *(<int*> i1) )
i1 += is1
op += os
Error
Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef npy_intp os = steps[1], n = dimensions[0]
cdef char *i1 = args[0], *op = args[1]
for i in range(n):
*(<double *>op) = (*extra <double(*)(int)> ) ( *(<int*> i1) )
^
------------------------------------------------------------
...pymc_numexprtest/src/test/test3.pyx:12:37: Expected an identifier or
literal
building 'base_functions' extension
Am I doing something wrong or is this just not supported?
John
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev