dask_awkward.Scalar
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_objectandnew_known_scalarfactory functions are used for creating new instances.- Parameters
dsk (HighLevelGraph) –
name (str) –
meta (Any | None) –
dtype (DTypeLike | None) –
known_value (Any | None) –
- Return type
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
daskdivisionsScalar and Records do not have divisions by definition.
dtypefieldskeyknown_valuelayoutnamenpartitionsScalar and Records are unpartitioned by definition.