Join GitHub today
np.arange with njit showing erratic behaviour #1299
I am having some issues with the np.arange() function with nopython mode
IndexError: index 5 is out of bounds for axis 0 with size 5
Is this the intended behaviour? I stumbled upon this because I am having a mysterious error with the np.arange(variable) when variable has been subject to initialization
Error in nopython mode!
Yes, Numba currently doesn't check array bounds when indexing. We would have to research whether LLVM is able to elide the bounds checking code in common cases, otherwise that would slow common usecases down by a significant amount.
Can you paste the entire error? For the record, I've tried to reproduce and get the following error message:
Yep, This is the full error I get
Minimal working example: