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

上一篇: 如何在本地地址上使用Google Analytics和Google跟踪代码管理器2?

下一篇: 在cython中的c数组上的Memoryview