Given an array:
import numpy as np a = np.array([1, 2, 3, 4, 5])
An array of indices:
indices = np.array([0, 2, 4])