numba示例

02/01 10:34
阅读数 77

 

# -*- 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)

 

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部