Let A be a matrix:
A = array([[0. , 0. , 0. , ..., 0. , 0. ,
0. ],
[0. , 0.28867513, 0.28867513, ..., 0. , 0. ,
0. ],
[0. , 0. , 0. , ..., 0. , 0. ,
0. ],
[0. , 0. , 0. , ..., 0. , 0. ,
0. ],
[0. , 0.13363062, 0.13363062, ..., 0. , 0. ,
0. ]])
B = array([0.70710678, 0.66666667, 0.5 , 0.75 , 1. ])
I need to find the indexes of B in A.
Expected Output:
Matrix containing position of elements.
I want to perform this using inbuilt numpy commands/ logic and not using list comprehension or for loops.
Update: Already tried using isin, unable to tackle multiple elements with same value in the same row.
Updated with a better example of the problem.