Ciwnerr
Ciwnerr

Reputation: 33

numba argument argtypes deprecated keyword

When i type following code :

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

and get error message

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

My numba version is 0.28.0, i know that numba 0.18 version removes the old deprecated and undocumented argtypes and restype arguments to the @jit decorator.

please help me solve this problem.

Upvotes: 2

Views: 1277

Answers (1)

implmentor
implmentor

Reputation: 1416

The error message is telling you what it expects

Signatures should be passed as the first positional argument.

So instead of

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

They should be positional

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

Upvotes: 5

Related Questions