I have a list of indices (example below) and I want to define a function that given such an input i.e.,
a=np.array([1,2,3,4,6,7,8,11,12,13])
will retu