Use numpy.intp for indices