def _remove_duplicate_points(points, groups):
group_initial_ids = groups[:, GPFIRST]<EOL>to_be_reduced = np.zeros(len(group_initial_ids))<EOL>to_be_removed = []<EOL>for ig, g in enumerate(groups):<EOL><INDENT>iid, typ, pid = g[GPFIRST], g[GTYPE], g[GPID]<EOL>if pid != -<NUM_LIT:1> and typ != <NUM_LIT:1> and groups[pid][GTYPE] != <NUM_LIT:1>:<EOL><INDENT>to_be_removed.append(iid)<EOL>to_be_reduced[ig + <NUM_LIT:1>:] += <NUM_LIT:1><EOL><DEDENT><DEDENT>groups[:, GPFIRST] = groups[:, GPFIRST] - to_be_reduced<EOL>points = np.delete(points, to_be_removed, axis=<NUM_LIT:0>)<EOL>return points, groups<EOL>
Removes the duplicate points from the beginning of a section,
    if they are present in points-groups representation.

    Returns:
        points, groups with unique points.