ak.forms.UnionForm#

Defined in awkward.forms.unionform on line 21.

class ak.forms.UnionForm(tags, index, contents, *, parameters=None, form_key=None)#

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
_tags#
_index#
_contents#
property tags#
property index#
property contents#
copy(tags=UNSET, index=UNSET, contents=UNSET, *, parameters=UNSET, form_key=UNSET)#
classmethod simplified(tags, index, contents, *, parameters=None, form_key=None)#
_union_of_optionarrays(index, parameters)#
_to_dict_part(verbose, toplevel)#
property type#
_columns(path, output, list_indicator)#
_prune_columns(is_inside_record_or_union: bool) awkward.forms.form.Form | None#
_select_columns(match_specifier: awkward.forms.form._SpecifierMatcher) awkward._typing.Self#
_column_types()#
_expected_from_buffers(getkey: collections.abc.Callable[[awkward.forms.form.Form, str], str], recursive: bool) awkward._typing.Iterator[tuple[str, awkward._typing.DType]]#
_is_equal_to(other: awkward._typing.Any, all_parameters: bool, form_key: bool) bool#