Looking into this related question:
Numpy Array Get row index searching by a row
I would like to know if there is a method without loops that would return an array of indexes of where each row of array y is located within array x.
Here is an example:
x= np.array([[0,1],[0,2],[0,3],[1,1],[1,2],[1,3],[2,1],[2,2],[2,3]])
y = np.array([[0,1],[0,3],[1,1],[2,1],[2,2],[2,3]])
The desired output should be:
[0,2,3,6,7,8]
y array will never have any duplicates, and all elements of y will be located within x. Since I am working with big arrays (in the order millions of elements), using any loop solution is not feasible. This is the reason why I am looking for a "numpy command", if it exists, that does the trick.