ak.with_named_axis
------------------

.. py:module: ak.with_named_axis

Defined in `awkward.operations.ak_with_named_axis <https://github.com/scikit-hep/awkward/blob/36da52cfa8846355c390beb6555eac1d31c27c26/src/awkward/operations/ak_with_named_axis.py>`__ on `line 21 <https://github.com/scikit-hep/awkward/blob/36da52cfa8846355c390beb6555eac1d31c27c26/src/awkward/operations/ak_with_named_axis.py#L21>`__.

.. py:function:: ak.with_named_axis(array, named_axis, *, highlevel=True, behavior=None, attrs=None)


    :param array: Array-like data (anything :py:obj:`ak.to_layout` recognizes).
    :param named_axis: AxisTuple | AxisMapping: Names to give to the array axis; this assigns
                   the ``"__named_axis__"`` attr. If None, any existing name is unset.
    :param highlevel: If True, return an :py:obj:`ak.Array`; otherwise, return
                  a low-level :py:obj:`ak.contents.Content` subclass.
    :type highlevel: bool
    :param behavior: Custom :py:obj:`ak.behavior` for the output array, if
                 high-level.
    :type behavior: None or dict
    :param attrs: Custom attributes for the output array, if
              high-level.
    :type attrs: None or dict

Returns an :py:obj:`ak.Array` or :py:obj:`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.