dask_awkward.from_dask_array

dask_awkward.from_dask_array#

dask_awkward.from_dask_array(array, behavior=None, attrs=None)[source]#

Convert a Dask Array collection to a Dask Awkard Array collection.

Parameters:
  • array (dask.array.Array) – Array to convert.

  • behavior (dict, optional) – Custom ak.behavior for the output array.

  • attrs (mapping, optional) – Custom attributes for the output array.

Returns:

The Awkward Array Dask collection.

Return type:

Array

Examples

>>> import dask.array as da
>>> import dask_awkward as dak
>>> x = da.ones(1000, chunks=250)
>>> y = dak.from_dask_array(x)
>>> y
dask.awkward<from-dask-array, npartitions=4>