登录  注册

首页->Python期末

补全计算数组a = np.array([1,2,3,2,3,4,3,4,5,6])和数组b = np.array([7,2,10,2,7,4,9,4,9,8])之间的欧式距离distance的代码。 a = np.array([1,2,3,2,3,4,3,4,5,6]) b = np.array([7,2,10,2,7,4,9,4,9,8]) distance=___

答: np.sqrt(np.sum((a-b)**2))
继续答题:下一题
微考学堂微考学社

更多Python期末试题