I am getting the error:
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name 'sum_': cannot determine Numba type of <class 'function'>
for the following code:
import numba as nb
from numba.pycc import CC
cc = CC('yin')
@cc.export('sum_', nb.float32(nb.float32[:]))
def sum_(a):
s = 0
for i in a:
s += i
return s
@cc.export('average', nb.float32(nb.float32[:]))
def average(a):
return sum_(a)/len(a)
cc.compile()
What should I be doing?