def findDuplicates(arr, tol=1e-8):
    """ Takes a sorted array and returns the index of duplicated valuesinside the array

    :params arr: np.array. e.g., a timeline
    :params tol. optional. criterion to know if values are being duplicated.
    :returns list of duplicated indices
    """
    duplicates = []
    for i, a in enumerate(arr):
        if i == 0:
            pass
        else:
            if abs(a - arr[i - 1]) < tol:
                duplicates.append(i)
    return duplicates