non-precise type array

452 views
Skip to first unread message

Imran Akbar

unread,
Oct 21, 2020, 7:23:18 PM10/21/20
to Numba Public Discussion - Public
Hi,

I've got a function like this:

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)
    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.

Any ideas on how to fix this?

thanks

Graham Markall

unread,
Oct 23, 2020, 12:27:06 PM10/23/20
to numba...@continuum.io
Hi Imran,

The Numba mailing list is deprecated - could you open a thread on the Numba Discourse group please?

A place to discuss both usage and development of the Numba project
numba.discourse.group



Many thanks,
Graham.

From: numba...@continuum.io <numba...@continuum.io> on behalf of Imran Akbar <skun...@gmail.com>
Sent: Thursday, October 22, 2020 12:02 AM
To: Numba Public Discussion - Public <numba...@continuum.io>
Subject: [Numba] non-precise type array
 
External email: Use caution opening links or attachments

--
You received this message because you are subscribed to the Google Groups "Numba Public Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/numba-users/0398b61d-391b-450c-bac9-44134137647an%40continuum.io.
Reply all
Reply to author
Forward
0 new messages