学习随笔-ValueError: The truth value of an array with more than one element is ambiguous
问题:我的代码是想判断两个nparray是否完全相等,ifprediction[i]==Y_test[i]:运行时报的错误为:ValueError:Thetruthvalueofanarraywithmorethanoneelementisambiguous.Usea.any()ora.all()原因:假设存在两个nparray:a=np.array([1,2,3])b=np.array([1,3