Python Numpy 求余弦相似度 import numpy as np import math x = [3, 1, 2, 4] y = [1, 2, 1, 2] def dotProduct(v1,