2016-10-06 26 views
1

当我输入以下代码:numba参数argtypes过时的关键字

mandel_numba = numba.jit(restype=uint32, argtypes=[float32, float32, uint32])(mandel) 

,并得到错误信息

raise DeprecationError(_msg_deprecated_signature_arg.format('argtypes')) 
numba.errors.DeprecationError: Deprecated keyword argument `argtypes`. Signatures should be passed as the first positional argument. 

我numba版本是0.28.0,我知道numba 0.18版本删除旧的过时和未记录的argtypes和restType参数给@jit装饰器。

请帮我解决这个问题。

回答

2

错误信息告诉你它预计

Signatures should be passed as the first positional argument. 

所以不是

numba.jit(restype=uint32, argtypes=[float32, float32, uint32]) 

他们应该是位置

numba.jit(uint32(float32, float32, uint32)) 
+0

谢谢!这行得通。 – Ciwnerr