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
Post a Comment