ak.contents.EmptyArray#

Defined in awkward.contents.emptyarray on line 50.

class ak.contents.EmptyArray(self, *, parameters=None, backend=None)#

An EmptyArray is used whenever an array’s type is not known because it is empty (such as data from ak.ArrayBuilder without enough sample points to resolve the type).

Unlike all other Content subclasses, EmptyArray cannot contain any parameters (parameter values are always None).

EmptyArray has no equivalent in Apache Arrow.

To illustrate how the constructor arguments are interpreted, the following is a simplified implementation of __init__, __len__, and __getitem__:

class EmptyArray(Content):
    def __init__(self):
        pass

    def __len__(self):
        return 0

    def __getitem__(self, where):
        if isinstance(where, int):
            assert False

        elif isinstance(where, slice) and where.step is None:
            return EmptyArray()

        elif isinstance(where, str):
            raise ValueError("field " + repr(where) + " not found")

        else:
            raise AssertionError(where)
ak.contents.EmptyArray.copy(self, *, parameters=UNSET, backend=UNSET)#
ak.contents.EmptyArray.__copy__(self)#
ak.contents.EmptyArray.__deepcopy__(self, memo)#
ak.contents.EmptyArray.simplified(cls, *, parameters=None, backend=None)#
ak.contents.EmptyArray._form_with_key(self, getkey)#
ak.contents.EmptyArray._to_buffers(self, form, getkey, container, backend, byteorder)#
ak.contents.EmptyArray._to_typetracer(self, forget_length)#
ak.contents.EmptyArray._touch_data(self, recursive)#
ak.contents.EmptyArray._touch_shape(self, recursive)#
ak.contents.EmptyArray.length#
ak.contents.EmptyArray.__repr__(self)#
ak.contents.EmptyArray._repr(self, indent, pre, post)#
ak.contents.EmptyArray.to_NumpyArray(self, dtype, backend=None)#
ak.contents.EmptyArray.__iter__(self)#
ak.contents.EmptyArray._getitem_nothing(self)#
ak.contents.EmptyArray._is_getitem_at_placeholder(self)#
ak.contents.EmptyArray._getitem_at(self, where)#
ak.contents.EmptyArray._getitem_range(self, start, stop)#
ak.contents.EmptyArray._getitem_field(self, where, only_fields=())#
ak.contents.EmptyArray._getitem_fields(self, where, only_fields=())#
ak.contents.EmptyArray._carry(self, carry, allow_lazy)#
ak.contents.EmptyArray._getitem_next_jagged(self, slicestarts, slicestops, slicecontent, tail)#
ak.contents.EmptyArray._getitem_next(self, head, tail, advanced)#
ak.contents.EmptyArray._offsets_and_flattened(self, axis, depth)#
ak.contents.EmptyArray._mergeable_next(self, other, mergebool)#
ak.contents.EmptyArray._mergemany(self, others)#
ak.contents.EmptyArray._fill_none(self, value)#
ak.contents.EmptyArray._local_index(self, axis, depth)#
ak.contents.EmptyArray._numbers_to_type(self, name, including_unknown)#
ak.contents.EmptyArray._is_unique(self, negaxis, starts, parents, outlength)#
ak.contents.EmptyArray._unique(self, negaxis, starts, parents, outlength)#
ak.contents.EmptyArray._argsort_next(self, negaxis, starts, shifts, parents, outlength, ascending, stable)#
ak.contents.EmptyArray._sort_next(self, negaxis, starts, parents, outlength, ascending, stable)#
ak.contents.EmptyArray._combinations(self, n, replacement, recordlookup, parameters, axis, depth)#
ak.contents.EmptyArray._reduce_next(self, reducer, negaxis, starts, shifts, parents, outlength, mask, keepdims, behavior)#
ak.contents.EmptyArray._validity_error(self, path)#
ak.contents.EmptyArray._nbytes_part(self)#
ak.contents.EmptyArray._pad_none(self, target, axis, depth, clip)#
ak.contents.EmptyArray._to_arrow(self, pyarrow, mask_node, validbytes, length, options)#
ak.contents.EmptyArray._to_backend_array(self, allow_missing, backend)#
ak.contents.EmptyArray._remove_structure(self, backend, options)#
ak.contents.EmptyArray._recursively_apply(self, action, depth, depth_context, lateral_context, options)#
ak.contents.EmptyArray.to_packed(self, recursive=True)#
ak.contents.EmptyArray._to_list(self, behavior, json_conversions)#
ak.contents.EmptyArray._to_backend(self, backend)#
ak.contents.EmptyArray._is_equal_to(self, other, index_dtype, numpyarray, all_parameters)#