differt.geometry.merge_cell_ids#
- merge_cell_ids(cell_ids_a, cell_ids_b)[source]#
Merge two arrays of cell indices as returned by
Paths.multipath_cells.Let the returned array be
cell_ids, thencell_ids[i] == cell_ids[j]for alli,jindices if(groups_a[i], groups_b[i]) == (groups_a[j], groups_b[j]), granted that arrays have been reshaped to uni-dimensional arrays. Of course, this method handles multiple dimensions and will reshape the output array to match initial shape.For an actual application example, see Multipath Lifetime Map.
Warning
The indices used in the returned array have nothing to do with the ones used in individual arrays.
- Parameters:
cell_ids_a (
Int[ArrayLike, '*batch']) – The first array of cell indices.cell_ids_b (
Int[ArrayLike, '*batch']) – The second array of cell indices.
- Return type:
- Returns:
The new array group indices.