def sum_cmplx (in1):
    in1 = np.asarray (in1, np.complex128)
    shape = in1.shape
    it = in1.flat
    
    cdef double complex val
    while np.PyArray_ITER_NOTDONE (it):
        val = (<complex>np.PyArray_ITER_DATA (it))[0]
        out += val
        np.PyArray_ITER_NEXT (it)
        
    return val

Error converting Pyrex file to C:
------------------------------------------------------------
...
    shape = in1.shape
    it = in1.flat
    
    cdef double complex val
    while np.PyArray_ITER_NOTDONE (it):
        val = (<complex>np.PyArray_ITER_DATA (it))[0]
               ^
------------------------------------------------------------

/home/nbecker/raysat/mod/sum.pyx:34:16: 'complex' is not a type identifier

Any hints?

_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to