I have a list of tuples A containing an array and a boolean value, and a sub list of it, B. I'm trying to remove the sublists' elements from the main list, so im using:
v1 = np.array([1, 2, 3])
v2 = np.array([1, 2, 2])
A = [(v1, True), (v2, False)]
B = [(v1, True)]
new_list = [x for x in A if x not in B]
I'm getting the following error:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all().
What truth values? And how will any() help here? i'm looking for tuples not booleans