python - Cython function returning pointer without GIL error -


i dont understand why not compile. _svd returns double*, , assigning double*.

error message: coercion python not allowed without gil

cpdef svd(a_f, m, n):     cdef double *s_p      nogil:         s_p = _svd(a_f, m, n)      return <double[:min(m, n)]> s_p  cdef double* _svd(double[:] a_f, int m, int n) nogil:     #code removed bc long 

edit: works gil, want call without gil.

try this

cpdef svd(a_f, int m, int n):      cdef double *s_p      cdef double[:] abc = a_f      nogil:           s_p = _svd(abc , m, n) 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -