Hi all, I have a general question. I would like to compile the following function:
def test1(t):
return t+1
def test2(t):
return t+2
fs_compiled = [nb.vectorize(f) for f in [test1,test2]]
@nb.njit()
def check_nb1(t):
out = sum(
[
fs_compiled[x](t) for x in np.arange(2)
]
)
return out
However, when I run the code (check_nb1(10)
), it gives the following error: Cannot type list element type <class 'numba.np.ufunc.dufunc.DUFunc'>
. Could anyone please help me? Thanks a lot!
Blockquote