geost.models.model_utils.label_consecutive_2d#
- geost.models.model_utils.label_consecutive_2d(array: ndarray, axis: int = 0) ndarray [source]#
Label consecutive array elements with unique numbers along a specified axis in a 2D array.
- Parameters:
array (np.ndarray) – Array of shape (m, n) to label the elements in.
axis (int, optional) – Axis along to label. The default is 0.
- Returns:
Array with labelled elements with the same shape as the input array.
- Return type:
np.ndarray