bin_edges = arr[np.where(np.diff(arr) > 10)[0]]
indices = np.digitize(arr, bin_edges, right=True)
print(indices)
Increase a numpy array's elements by 1 at particular indices (for use with grouping an astropy table)