unittest/python/crocoddyl/locomotion/spline_utils.py
def removeDuplicates(arr, indices):
    """ Takes an arr and a sorted list of indices.
    Removes arr[i] for i in indices and returns a new array.
    if arr is 2D, removes the i^{th} row for i in indices.

    :params arr: np.array. e.g., a timeline
    :params indices: sorted list of indices to remove.
    :returns new_arr: np.array
    """

    for i in indices[::-1]:
        if len(arr.shape) == 1:
            arr = np.delete(arr, i)
        elif len(arr.shape) == 2:
            arr = np.delete(arr, i, axis=0)
    return arr
 Takes an arr and a sorted list of indices.
    Removes arr[i] for i in indices and returns a new array.
    if arr is 2D, removes the i^{th} row for i in indices.

    :params arr: np.array. e.g., a timeline
    :params indices: sorted list of indices to remove.
    :returns new_arr: np.array
    
Takes an arr and a sorted list of indices.
Removes arr[i] for i in indices and returns a new array.
if arr is 2D, removes the i^{th} row for i in indices.
Takes an arr and a sorted list of indices . Removes arr [ i ] for i in indices and returns a new array . if arr is 2D removes the i^ { th } row for i in indices .
def removeDuplicates(arr, indices):
    for i in indices[::-1]:
        if len(arr.shape) == 1:
            arr = np.delete(arr, i)
        elif len(arr.shape) == 2:
            arr = np.delete(arr, i, axis=0)
    return arr
def removeDuplicates ( arr , indices ) : for i in indices [ : : - 1 ] : if len ( arr . shape ) == 1 : arr = np . delete ( arr , i ) elif len ( arr . shape ) == 2 : arr = np . delete ( arr , i , axis = 0 ) return arr
Takes an arr and a sorted list of indices.
Takes an arr and a sorted list of indices .
""" Takes an arr and a sorted list of indices.
    Removes arr[i] for i in indices and returns a new array.
    if arr is 2D, removes the i^{th} row for i in indices.

    :params arr: np.array. e.g., a timeline
    :params indices: sorted list of indices to remove.
    :returns new_arr: np.array
    """
None
new_arr
arr
indices
params
np.array. e.g., a timeline
np . array . e . g . a timeline
params
sorted list of indices to remove.
sorted list of indices to remove .