arr = np.array([3, 7, 2, 9, 4, 6]) indices = np.where(arr > 5) # indices: (array([1, 3, 5]),) filtered = arr[indices] # filtered: [7 9 6] __ __