1 import numpy as np
2 from numba import njit,jit
3
4 @njit
5 def gpuu(x,y):
6 return np.argwhere((x==y))
7
8
9 a = np.array(range(10000))
10 gpuu(50000,a)
11
~
~
create the following error
Traceback (most recent call last):
File “gpu.py”, line 10, in
gpuu(50000,a)
File “/usr/lib/python3/dist-packages/numba/dispatcher.py”, line 348, in _compile_for_args
error_rewrite(e, ‘typing’)
File “/usr/lib/python3/dist-packages/numba/dispatcher.py”, line 315, in error_rewrite
reraise(type(e), e, None)
File “/usr/lib/python3/dist-packages/numba/six.py”, line 658, in reraise
raise value.with_traceback(tb)
numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Use of unsupported NumPy function ‘numpy.argwhere’ or unsupported use of the function.
File “gpu.py”, line 6:
def gpuu(x,y):
return np.argwhere((x==y))
^
[1] During: typing of get attribute at gpu.py (6)
File “gpu.py”, line 6:
def gpuu(x,y):
return np.argwhere((x==y))
^
This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.
To see Python/NumPy features supported by the latest release of Numba visit:
and
For more information about typing errors and how to debug them visit:
If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
can you assist ?