1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > 成功解决ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or

成功解决ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or

时间:2018-07-24 12:52:49

相关推荐

成功解决ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or

成功解决ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

目录

解决问题

解决思路

解决方法

解决问题

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

解决思路

值错误:包含一个以上元素的数组的真值是不明确的,要使用a.any()或a.all()

解决方法

if data_z==data_x:print('data_x等价于data_z')

改为

if data_z.all()==data_x.all():print('data_x等价于data_z')

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。