ak.backend#

Defined in awkward.operations.ak_backend on line 12.

ak.backend(*arrays)#
Parameters:

arrays – Array-like data (anything ak.to_layout recognizes).

Returns the name of the backend used by arrays. This name may be

  • "cpu" for arrays backed by NumPy;

  • "cuda" for arrays backed by CuPy;

  • "jax" for arrays backed by JAX;

  • "typetracer" for arrays without any data;

  • None if the objects are not Awkward, NumPy, JAX, CuPy, or typetracer arrays (e.g. Python numbers, booleans, strings).

If there are multiple, compatible backends (e.g. NumPy & typetracer) amongst the given arrays, the coercible backend is returned.

See ak.to_backend.