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

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -