def remove_vertical_seam(img, seam):
    """
    Remove a vertical seam from an image

    Parameters
    ----------
    I: ndarray(nrows, ncols, 3)
        An RGB image
    seam: ndarray(nrows, dtype=int)
        A list of column indices of the seam from
        top to bottom

    Returns
    ----------
    ndarray(nrows, ncols-1, 3)
        An RGB image with the seam removed
    """
    for row in range(img.shape[0]):
        idx = seam[row]
        if len(img.shape) > 2:
            img[row, idx:-1, :] = img[row, idx+1::, :]
        else:
            img[row, idx:-1] = img[row, idx+1::]
    if len(img.shape) > 2:
        return img[:, 0:-1, :]
    else:
        return img[:, 0:-1]