I have one array of vectors (or for simplicity you can assume I have one array) based on some computation I make 2 different arrays with same size of first array that contains number between 0 and 1 (for each index of the first array the second and third array containing the hamming distances) now I want to sort first array based on second and third array at the same time. Since second and third array contains value between 0 and 1 I want to sort first array in order to each element has the closest distance of second and third array to the value 0.5.
If I want to make some realistic example :
first = numpy.array([1,2,3])
second = numpy.array([0.2, 0.5, 0.97])
third = numpy.array([0.3, 0.45, .98])
first = sort(first, second, third)
After that first must be something like this: [2,1,3]
why I should have this? because second[1] and third[1] are the closest point to the (0.5,0.5) (by closes I mean something like euclidean distance or any other one) and after index number 2 index number 0 has the second closes distance to point (0.5,0.5).
Or If I have second = numpy.array([0.62, 0.61, 0.97]) and third = numpy.array([0.49, 0.72, 0.97]) I want the sort array return indices like [0,1,2] so the first array after sorting is like this [1,2,3] why? because second[0] and third[0] are the closest point to the point (0.5,0.5) and so on.