I have 2 Arrays, e.g. like:
A: [[1 2 3][2 2 2][1 2 3][2 3 3][2 2 2][2 3 3][2 3 3]]
B: [[1 2 3][2 2 2][2 3 3]]
B are the sorted unique rows of A.
I need:
C: [0 1 0 2 1 2 2]
Which is the list of indices of B in the order of A. I would like to avoid loops because it needs to be fast even with very big arrays.
The only solutions to this i found were only for 1D Arrays (e.g. Getting the indices of several elements in a NumPy array at once ).
I think this can be solved using np.void in a similar way to this: Find unique rows in numpy.array but i cannot get my head around it :/
I need to use NumPy 1.10 with no other libraries available.