在 numba 中提前编译使用类型化字典
Using typed dictionaries in ahead of time compilation in numba
我正在尝试在 numba 中对一个函数使用提前编译,该函数将 numba 类型的字典作为其输入。该文件编译没有错误,但是当我加载生成的模块时出现错误:
dlopen(/path_to_module, 2): Symbol not found: __numba_hashsecret_djbx33a_suffix
Referenced from: /path_to_module
Expected in: flat namespace
in /path_to_module
产生相同错误的示例函数是:
@jit(nopython=True)
@cc.export('my_func', 'f8(DictType(unicode_type, f8))')
def my_func(d):
return d['a'] + d['b']
该函数将被编译代码中的另一个函数调用。
这原来是 Numba 中的一个错误,几周前刚刚合并到 master 中的修复程序:
我正在尝试在 numba 中对一个函数使用提前编译,该函数将 numba 类型的字典作为其输入。该文件编译没有错误,但是当我加载生成的模块时出现错误:
dlopen(/path_to_module, 2): Symbol not found: __numba_hashsecret_djbx33a_suffix
Referenced from: /path_to_module
Expected in: flat namespace
in /path_to_module
产生相同错误的示例函数是:
@jit(nopython=True)
@cc.export('my_func', 'f8(DictType(unicode_type, f8))')
def my_func(d):
return d['a'] + d['b']
该函数将被编译代码中的另一个函数调用。
这原来是 Numba 中的一个错误,几周前刚刚合并到 master 中的修复程序: