differt.geometry.merge_cell_ids

Contents

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, then cell_ids[i] == cell_ids[j] for all i, j indices 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:
Return type:

Int[Array, '*batch']

Returns:

The new array group indices.