Total blank on how to do this.
I have an array “points” and an array “a” containing some of those points:
points = numpy.array([[1,2],[4,0],[3,0],[2,4]])
a = numpy.array([[1,2], [3,0]])
How can I get the indices in “points” of points in a ([0,2]), preferably without loops?
This is an O(n²) operation and is not meant to have a direct method without a loop.
The following solution works for any size of 2D variables of
pointsanda.However, this does not work for values of
amissing frompoints.