TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function setitem>) found for signature:
This error is encountered when tried to set all the elements less than a given threshold in matrix the SG_Z to zero by using the following command SG_Z[SG_Z < Threshold] = 0
This command is being used in a function that is parallelized using Numba @jit. Due to the existence of this line, the function is not running.
You don't say much about
SG_Zbut I suspect it is 2d (or higher).numbahas limited multidimensional indexing abilities (compared tonumpy)The
numba:It's not
setitemin general that missing;numbadoes this all the time. It'ssetitemfor this particular combination of arguments.It does work if I first ravel the array.
But in
numbawe don't need to be afraid of iteration, so for a 2d input we could iterate on rows:There may be more general ways of writing this, and providing signatures, but this should give some idea(s) of how to address this issue.