numba示例

三世轮回 提交于 2021-02-01 11:05:15

 

# -*- coding: utf-8 -*-
import os

import numba
import numpy as np
import cv2
from numba import jit


@jit
def aaa(ccc):

    py_list = [0,1]
    number_list = numba.typed.List([0])

    cnts = numba.typed.Dict.empty(
        key_type=numba.int64, value_type=numba.int64
    )

    # a_dict=numba.typed.Dict(asdfsdf)

    for i in ccc:
        number_list.append(i)
        cnts[i] = i
        # print(i[0])
    return number_list,cnts

if __name__ == '__main__':
    ccc=[0,1]
    number_list,cnts=aaa(numba.typed.List(ccc))
    print(number_list)
    print(cnts)

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!