This affects #2405.
Example: chkprint.py
import numpy as np
from numba import njit
@njit
def foo(arr):
print("In foo")
print(arr)
print("Out foo")
@njit
def bar(arr):
print("In bar")
foo(arr)
print("Out bar")
arr = np.arange(10)
print("Call foo")
foo(arr)
print("Call bar")
bar(arr)
Output:
Call foo
In foo
[0 1 2 3 4 5 6 7 8 9]
Out foo
Call bar
In bar
In foo
Traceback (most recent call last):
File "chkprint.py", line 24, in <module>
bar(arr)
RuntimeError: missing Environment
Seems like the environment pointer is not passed properly across nopython functions.
Hello, I am wondering when will this be fixed? print is a useful function even for numba.
Most helpful comment
Hello, I am wondering when will this be fixed? print is a useful function even for numba.