初始化 memoryview 变量时出错。这是我的代码:
cdef int *popref = <int*>malloc(popsize * sizeof(int))
cdef int [:] popref_mv = popref
这是我得到的错误:
Error: cdef int [:] popref_mv = popref
^
Expected an identifier or literal
在 Red Hat Linux 上运行 Python 2.6.6、GCC 4.4.7、Cython 0.14.1。