When I do something like:
points = np.array([[0.,0.],[1.,1.],[2.,2.]])
and attempt to check if a point is in the array such as:
[1.,2.] in points it returns:
True
When I would want it to return False. Why is this happening?
import numpy as np
points = np.array([[0.,0.],[1.,1.],[2.,2.]])
[np.array_equal([1,2],x) for x in points]
array_equal would be the method you are looking for. In case the element exists, it would return to True as one of the elements of this list.
Otherwise it checks whether any of the elements from this list 1 or 2 occurs in the given numpy array anywhere.