ak.with_named_axis#
Defined in awkward.operations.ak_with_named_axis on line 21.
- ak.with_named_axis(array, named_axis, *, highlevel=True, behavior=None, attrs=None)#
- Parameters:
array – Array-like data (anything
ak.to_layout
recognizes).named_axis – AxisTuple | AxisMapping: Names to give to the array axis; this assigns the
"__named_axis__"
attr. If None, any existing name is unset.highlevel (bool) – If True, return an
ak.Array
; otherwise, return a low-levelak.contents.Content
subclass.behavior (None or dict) – Custom
ak.behavior
for the output array, if high-level.attrs (None or dict) – Custom attributes for the output array, if high-level.
Returns an ak.Array
or ak.Record
(or low-level equivalent, if
highlevel=False
) with a new name. This function does not change the
array in-place. If the new name is None, then the array is returned as it is.