combine_patch_attrs

function of dascore.utils.attrs source

combine_patch_attrs(
    model_list: collections.abc.Sequence[PatchAttrs] ,
    conflict: Literal[‘drop’, ‘raise’, ‘keep_first’] = raise,
    drop_attrs: collections.abc.Sequence[collections.abc.Sequence[str], None] = None,
)-> ‘dc.PatchAttrs’

Merge Patch Attributes along a dimension.

Parameters

Parameter Description
model_list A list of models.
conflict Indicates how to handle attributes which hold conflicting values across
the patches being combined (eg data_type, data_units, custom attrs). A
missing value (None, NaN, ““) is a value like any other: it equals
another missing one and nothing else, so a patch which never stated an
attribute conflicts with one which did. History and the ids are never
compared. If”raise” (default) raise an
AttributeMergeError for
conflicting values. If “drop”, omit the conflicting attributes from the
output. If “keep_first”, keep the first patch’s value of each.
drop_attrs If provided, attributes which should be dropped.