def setElements(data, inds, vals):
    """
    Sets the elements in data specified by inds with the values in vals

    Args:
        data (ndarray): data to edit
        inds (ndarray): indexes of data to access
        vals (ndarray): new values to insert into the data
    Returns:
        ndarray: modified data
    """
    res = data.copy()
    for i in range(len(inds)):
        res[inds[i]] = vals[i]
    #res[inds] = vals
    #for i in range (0,(inds.size-1)):
    #    res[inds[i]] = vals[i]
    return res