ak.to_layout#
Defined in awkward.operations.ak_to_layout on line 14.
- ak.to_layout(array)#
- Parameters
array – Array-like data. May be a high level
ak.Array,ak.Record(ifallow_record),ak.ArrayBuilder, or low-levelak.contents.Content,ak.record.Record(ifallow_record), or a supported backend array (NumPyndarray, CuPyndarray, JAX DeviceArray), dataless TypeTracer, or an arbitrary Python iterable (forak.from_iterto convert).allow_record (bool) – If True, allow
ak.record.Recordas an output; otherwise, if the output would be a scalar record, raise an error.allow_other (bool) – If True, allow non-Awkward outputs; otherwise, if the output would be another type, raise an error.
Converts array (many types supported, including all Awkward Arrays and
Records) into a ak.contents.Content and maybe ak.record.Record or
other types.
This function is usually used to sanitize inputs for other functions; it
would rarely be used in a data analysis because ak.contents.Content and
ak.record.Record are lower-level than ak.Array.