Boolean operators behave differently when refactoring intermediate expression into variable #7640
Open
2 tasks done
Labels
bug - incorrect behavior
Bugs: incorrect behavior
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
i.e. it's possible to run as 'python bug.py'.
Tested using numba 0.54.1 (Windows 10, python 3.8, numpy 1.19.2).
Output:
I was expecting both lines to be
[False]
. Without the@numba.jit()
, this prints[False]
on both lines.My best guess was a mix-up between
~
as bitwise negation vs. boolean negation. Adding an explicitdtype=np.bool_
to the array constructors doesn't make a difference.The text was updated successfully, but these errors were encountered: