【发布时间】:2015-07-23 19:08:10
【问题描述】:
我不明白为什么这不能编译。 _svd 返回一个 double*,我将它分配给一个 double*。
错误消息:没有 GIL 就不允许来自 Python 的强制
cpdef svd(A_f, m, n):
cdef double *S_p
with 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 it is long
编辑:它适用于 GIL,但我想在没有 GIL 的情况下调用它。
【问题讨论】: