I have an array of floats (size 9300), and another array of ints (size 2600) with indexes of the first array. I am trying to get the values in the first array based on the index in the second array. Example:
index 1st_array
0 12.00
1 3.89
2 24.20
3 34.60
index 2nd_array
0 0
1 2
The output:
index 3nd_array
0 12.00
1 24.20
Edit: those are actually numpy arrays:
a1 = np.array([12.00, 3.89, 24.20, 34.60])
a2 = np.array([0, 2])