-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvmlite error: Operands must be the same type, got (i32, i64) #659
Comments
Most operations between np.int32 and np.int64 will result in the desired effect i.e. promotion. However, you've managed to find a bug in the compiler where that doesn't happen. This does not indicate a bug in your code (at least, this backtrace doesn't). To fix this, I will need the specific code that causes the crash above. |
My code begins with this Therefore, line 58 seems to be where the trouble begins. On this line, The final destination is the method Sorry that my methods pass many variables along the way (I have been running into errors where "variables might be uninitialized within closures"). My thoughts are that the error is most likely occurring somewhere in |
The |
After some debugging, I have narrowed it down to the @kernel
def rotate(self, array):
'''Rotates an array, deleting the oldest value'''
length = len(array)
for i in range(np.int64(len(array)) - 1):
array[length - i - 1] = array[length - i - 2]
array[0] = 0 |
I have avoided this error by changing the rotate function to the following: neg_one = np.int32(-1)
array[neg_one:] + array[:neg_one] If I change the code to use |
For exceptions where an operation is attempted between an
numpy.int32
andnumpy.int64
, there is no information (i.e. line number in my code) where the error occurs. Is there a way to enable more stacktrace information to find this error? Below is an example:The text was updated successfully, but these errors were encountered: