a = np.array([[383, 383, 384, 384, 384, 384, 384, 384, 384, 421, 422, 422, 422, 422, 423, 423, 423, 423, 423, 423, 479, 480, 481, 482, 483, 485, 485, 485, 485, 485, 485, 485, 513, 515, 517]])
b = np.array([384, 423, 485])
np.where(a == b[:,None])
returns me two arrays
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2]
[2, 3, 4, 5, 6, 7, 8, 14, 15, 16, 17, 18, 19, 25, 26, 27, 28, 29, 30, 31]
and i want to join?(i don't know how to call that operation) the two lists by the values of the first one , so the output will be like
[[2, 3, 4, 5, 6, 7, 8], [14, 15, 16, 17, 18, 19], [25, 26, 27, 28, 29, 30, 31]]
how can i do it?
(my final mission is to get the central value of each list in the last array)