ak.kernels
----------

Defined in `awkward.operations.convert <https://github.com/scikit-hep/awkward-1.0/blob/80bbef0738a6b7928333d7c705ee1b359991de5b/src/awkward/operations/convert.py>`__ on `line 724 <https://github.com/scikit-hep/awkward-1.0/blob/80bbef0738a6b7928333d7c705ee1b359991de5b/src/awkward/operations/convert.py#L724>`__.

.. py:function:: ak.kernels()

Returns the names of the kernels library used by ``arrays``. May be

   * ``"cpu"`` for ``libawkward-cpu-kernels.so``;
   * ``"cuda"`` for ``libawkward-cuda-kernels.so``;
   * ``"mixed"`` if any of the arrays have different labels within their
     structure or any arrays have different labels from each other;
   * None if the objects are not Awkward, NumPy, or CuPy arrays (e.g.
     Python numbers, booleans, strings).

Mixed arrays can't be used in any operations, and two arrays on different
devices can't be used in the same operation.

To use ``"cuda"``, the package
`awkward-cuda-kernels <https://pypi.org/project/awkward-cuda-kernels>`__
be installed, either by

.. code-block:: python


    pip install awkward-cuda-kernels

or as an optional dependency with

.. code-block:: python


    pip install awkward[cuda] --upgrade

It is only available for Linux as a binary wheel, and only supports Nvidia
GPUs (it is written in CUDA).

See :py:obj:`ak.to_kernels`.

