def add_sparse_skip(arr, data, indices, skip_index=-1):
    """add sparse data to a dense array

    (Similar to add_sparse, but with an option to skip an index)

    :param arr: dense array of floats
    :param data: array of floats
    :param indices: array of integers
    :param skip_index: integer, skip adding this index
    :return: array consisting of arr+data
    """
    for i in range(len(indices)):
        if indices[i] != skip_index:
            arr[indices[i]] += data[i]
    return arr