-
-
Save samaid/2303cb2a0914338817f58a445d32b26c to your computer and use it in GitHub Desktop.
JITClass Dictionary Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numba import jitclass | |
from numba import types | |
from numba.typed import Dict | |
@jitclass([('d', types.DictType(types.intp, types.float64))]) | |
class DictWrapper(object): | |
def __init__(self): | |
d = Dict() | |
d[1] = 1.2 | |
self.d = d | |
dw = DictWrapper() | |
print(dw.d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment