【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>
相关文章
相关标签/搜索