【Python】Python-numpy邏輯報錯:The truth value of an array with more than one element is ambiguous. Us

報錯代碼:python   import numpy as np a=np.zeros(3) a[0]=0; a[1]=1; a[2]=2 if a==[1,2,3]: print "OK" else: print "NOT OK" Traceback (most recent call last): File "<pyshell#45>", line 1, in <module>
相關文章
相關標籤/搜索