def remove_duplicate_values(array_like, tol=0.0):
    """
    Removes duplicate values from list (when tol=0.0) or remove approximately duplicate
    values if tol!=0.0.
    """
    unique_values = [array_like[0]]
    for element in array_like:
        element_is_duplicate = False
        for uval in unique_values:
            if abs(uval - element) <= tol:
                element_is_duplicate = True
        if not element_is_duplicate:
            unique_values.append(element)
    return unique_values