def trim_factor_grid(F):
    """Trim the last gridpoint in each dimension from the factor grid.
    
    Parameters
    ----------
    F: Factor
        Factor containing the grid.
        
    Returns
    -------
    numpy array
        Grid with the last gridpoints removed. Note the original Factor is not modified.
    
    """
    
    factor_grid_new = F.factor_grid[tuple([slice(None,-1)]*len(F.dims))]
    
    return factor_grid_new