unittest/python/crocoddyl/locomotion/spline_utils.py
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
 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
    
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
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
def findDuplicates(arr, tol=1e-8):
    duplicates = []
    for i, a in enumerate(arr):
        if i == 0:
            pass
        else:
            if abs(a - arr[i - 1]) < tol:
                duplicates.append(i)
    return duplicates
def findDuplicates ( arr , tol = 1e-8 ) : duplicates = [ ] for i , a in enumerate ( arr ) : if i == 0 : pass else : if abs ( a - arr [ i - 1 ] ) < tol : duplicates . append ( i ) return duplicates
Takes a sorted array and returns the index of duplicated valuesinside the array
:params arr: np.array.
Takes a sorted array and returns the index of duplicated valuesinside the array : params arr : np . array .
""" 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
    """
arr
tol