brainspace.utils.parcellation.relabel¶
-
brainspace.utils.parcellation.
relabel
(lab, new_labels=None)[source]¶ Relabel array.
Parameters: - lab (array_like) – Array to relabel.
- new_labels (array_like or dict, optional) – New labels. If dict, provide new label for each label in input array. If array_like, mapping is performed in ascending order. If None, relabel consecutively, starting from 0. Default is None.
Returns: new_lab (ndarray) – Array with new labels.