numba
numba copied to clipboard
Function compilation not being updated for specific types on 32-bit systems
Reporting a bug
- [x] I have tried using the latest released version of Numba (most recent is visible in the change log (https://github.com/numba/numba/blob/main/CHANGE_LOG).
- [x] I have included a self contained code sample to reproduce the problem. i.e. it's possible to run as 'python bug.py'.
Note: This is only observed in 32-bit systems and not 64-bit ones.
import numba
import numpy as np
@numba.njit
def foo(x):
print("from within: ",x)
return x
foo(0)
print( foo( np.iinfo(np.int32).max + 1) )
# Returns a negative integer (overflow), the function signature stays as `int32` argument instead of an `int64`/`uint32`
First encountered in #8041
Note:
- check typeof logic in dispatching. seems like it's always picking intp.