我在python中有以下列表:
listx = [array([-1.67457473, -0.13608048]), array([ 2.62527567, -2.06095641]), array([-1.54613966, -0.55125153]), array([ 1.10801579, 2.28617014]), array([-1.2743137 , -0.70983752]), array([ 0.76173662, 1.17195581])]
我想检查列表中此项目的索引:
item = [ 1.10801579, 2.28617014]
当我使用普通索引检查方法时:
index = listx.index(item)
我收到以下错误:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
知道如何解决这个问题吗?