Memoryview on c array in cython
Error initializing memoryview variable. This is my code:
cdef int *popref = <int*>malloc(popsize * sizeof(int))
cdef int [:] popref_mv = popref
And this is the error I am getting:
Error: cdef int [:] popref_mv = popref
^
Expected an identifier or literal
Running Python 2.6.6, GCC 4.4.7, Cython 0.14.1 on Red Hat Linux.
链接地址: http://www.djcxy.com/p/81324.html