Hi,

I’m new to numba, but excited by what I’ve read about it so far.

I’ve got a function like this:

import numba

from numba import jit, types

from numba.typed import Dict

@jit(nopython=True)

def metrics_from_matrix(confusion_matrix):

zero_matrix = np.zeros(confusion_matrix.shape, dtype=numba.int32)

metrics = Dict.empty(

key_type=types.unicode_type,

value_type=types.float64

)

…

I get a ‘non-precise type array(pyobject,1d,C)’ error on the “zero_matrix” line, and if I comment that out, on the “metrics = Dict” line as well. The full example is here: https://pastebin.com/yUd4EeXq

Any ideas on how to fix this?

thank you