I have a python array of 3d points such as [p1,p2,...,pn] where p1 = [x1,y1,zi] I want to check weather a particular point p_i is a member of this, what is the right method for this?
Here is the code which I tried
import numpy
my_list = []
for x in range(0,10):
for y in range(0,10):
for z in range(0,5):
p1 = numpy.array([x,y,z])
my_list.append(p1)
check_list = numpy.array([[1,2,3],[20,0,20],[5,5,5]])
for p in check_list :
if p not in my_list:
print (p)
However I;m getting the error
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Apparently this method works for strings and numbers but not for arrays. What is the correct way to do this?