ak._v2.ak_from_cupy.from_cupy¶
Defined in awkward._v2.operations.convert.ak_from_cupy on line 8.
- ak._v2.ak_from_cupy.from_cupy(array, regulararray=False, highlevel=True, behavior=None)¶
- Parameters
array (cp.ndarray) – The CuPy array to convert into an Awkward Array.
regulararray (bool) – If True and the array is multidimensional, the dimensions are represented by nested
ak.layout.RegularArray
nodes; if False and the array is multidimensional, the dimensions are represented by a multivaluedak.layout.NumpyArray.shape
. If the array is one-dimensional, this has no effect.highlevel (bool) – If True, return an
ak.Array
; otherwise, return a low-levelak.layout.Content
subclass.behavior (None or dict) – Custom
ak.behavior
for the output array, if high-level.
Converts a CuPy array into an Awkward Array.
The resulting layout may involve the following ak.layout.Content
types
(only):
ak.layout.NumpyArray
ak.layout.RegularArray
ifregulararray=True
.
See also ak.to_cupy
, ak.from_numpy
and ak.from_jax
.