首页 > 其他分享 >小工具

小工具

时间:2023-03-13 11:46:06浏览次数:20  
标签:linalg url res download np 工具 def

#def download(url) -> np.array:
def download(url):
    while True:
        res = requests.get(url).content
        return cv2.imdecode(np.fromstring(res, np.uint8), cv2.IMREAD_COLOR).tolist() # bgr

 

def compute_distance(a, b):

    return np.dot(a, b.T) / (np.linalg.norm(a) * np.linalg.norm(b))

标签:linalg,url,res,download,np,工具,def
From: https://www.cnblogs.com/owlowl/p/17210776.html

相关文章