dask_awkward.Scalar#
- class dask_awkward.Scalar(dsk, name, meta=None, dtype=None, known_value=None)[source]#
Single partition Dask collection representing a lazy Scalar.
The class constructor is not intended for users. Instances of this class will be results from awkward operations.
Within dask-awkward the
new_scalar_object
andnew_known_scalar
factory functions are used for creating new instances.- Parameters:
dsk (HighLevelGraph)
name (str)
meta (Any | None)
dtype (DTypeLike | None)
known_value (Any | None)
- __init__(dsk, name, meta=None, dtype=None, known_value=None)[source]#
- Parameters:
dsk (HighLevelGraph)
name (str)
meta (Any | None)
dtype (DTypeLike | None)
known_value (Any | None)
- Return type:
None
Methods
__init__
(dsk, name[, meta, dtype, known_value])compute
(**kwargs)Compute this dask collection
from_known
(s[, dtype])Create a scalar from a known value.
persist
(**kwargs)Persist this dask collection into memory
to_delayed
([optimize_graph])Convert Scalar collection into a Delayed collection.
visualize
([filename, format, optimize_graph])Render the computation of this object's task graph using graphviz.
Attributes
dask
divisions
Scalar and Records do not have divisions by definition.
dtype
fields
key
known_value
layout
name
npartitions
Scalar and Records are unpartitioned by definition.