Very strange issue, giving you details for you to reproduce.
I have an ndarray x = [[ 58.0376135 ], [4739.44845915]]
which is defined as ndarray size (2,1)
I also have this list
lst = [array([[11120.19965669],[ 1036.7331153 ]]),
array([[ 58.0376135 ],[4739.44845915]]),
array([[ 766.38433838],[5524.3418457 ]])]
list of (2,1) ndarrays. As you can see, x == lst[1]
.
However, when I write lst.remove(x)
or x in lst
I get value error that the truth value of an array with more than one element is ambiguous. Strangely, on other examples it does work.
How can I make it work here too?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…