我有这样的功能:
@jit(nopython=True, nogil=True, parallel=True)
def parallelLoop():
X = [None] * 10
for i in prange(10):
X[i] = foo()
其中foo()
返回一个可变大小的numpy结构化数组。运行此命令会给我错误:
numba.errors.TypingError: Failed at nopython (nopython frontend)
invalid setitem with value of (list(float64), float64, float64, float64, int64, array(float64, 2d, C)) to element of none
如何在Numba中存储并行线程的结果,该结果是大小不同的结构化数组?