-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
featureNew feature or requestNew feature or request
Description
Currently if you merge two grids with "recalculate_ids" as an option, you have no clue how the ids are mapped.
This information could be useful if you have extra metadata on these ids for example, so that you can also update the references there.
Possible solutions:
- A a return to the merge function:
- return the offset that is used for the ids?
- Return a mapping from old -> new as return value
- Expose
_increment_grid_ids_by_offsetas a separate function on the grid. This way the user has the option to perform the action manually (with a known offset).
other_grid.increment_grid_ids_by_offset(10)
grid.merge(other_grid, mode="keep_ids")
- Expose an variable
id_offset(or similar) that indicates the offset that is used within therecalculate_ids.
This way the user knows that all ids are updated by that value and make their own mapping if necessary
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request