join_labels()

audformat.utils.join_labels(labels)[source]

Combine scheme labels.

Parameters

labels (Sequence[Union[List, Dict]]) – sequence of labels to join. For dictionary labels, labels further to the right can overwrite previous labels

Return type

Union[List, Dict]

Returns

joined labels

Raises

ValueError – if labels are of different dtype or not list or dict

Examples

>>> join_labels([{"a": 0, "b": 1}, {"b": 2, "c": 2}])
{'a': 0, 'b': 2, 'c': 2}