Python-numpy逻辑报错:The truth value of an array with more than one element is ambiguous
importnumpyasnumpya=np.zeros(3)a[0]=0;a[1]=1;a[2]=2ifa==[1,2,3]:print"OK"else:print"NOTOK"Traceback(mostrecentcalllast):File"",line1,inifa==[1,2,3]:ValueError:Thetruthvalueofanarraywithmorethanoneelem