摘要: 算欧拉距离: 1.np.sqrt(np.sum(np.square(X[i]-centroids[j]))) 2.np.linalg.norm(X[i]-cemtroids[j]) 算数组中最小值的索引: np.argmin(distance) 3.取数组满足条件的索引 1 X[idx==1] 2 阅读全文
posted @ 2023-04-26 20:59 iu本u 阅读(26) 评论(0) 推荐(0)