The following code works just fine in python, and when using njit. However, when I set NUMBA_DISABLE_JIT=1, it will print an empty list. Is this the expected behavior?

from numba.typed import List
from numba import njit

def bar():
    a = 12.1
    b = 13.2
    return List([a, b])

c = bar()

Yes, I believe this is known: `typed.List` ignores constructor arguments when jitting is disabled · Issue #6001 · numba/numba · GitHub – it’s a bug which initially seems trivial to fix but then turns out to be very, very hard.

1 Like