I think numpy.take — NumPy v1.23 Manual is what you want.
Example data = [10, 11, 12, 13, 14] indices = [0, -1, 2, 3]
np.take(data, indices) → [10, 14, 12, 13]
I think numpy.take — NumPy v1.23 Manual is what you want.
Example data = [10, 11, 12, 13, 14] indices = [0, -1, 2, 3]
np.take(data, indices) → [10, 14, 12, 13]