delayed_image.delayed_base module¶
Abstract nodes
- class delayed_image.delayed_base.DelayedOperation[source]¶
Bases:
NiceRepr- as_graph(fields='auto')[source]¶
Builds the underlying graph structure as a networkx graph with human readable labels.
- Parameters:
fields (str | List[str]) – Add the specified fields as labels. If ‘auto’ then does somthing “reasonable”. If ‘all’ then shows everything. TODO: only implemented for “auto” and “all”, implement general field selection (PR Wanted).
- Returns:
networkx.DiGraph
- print_graph(fields='auto', with_labels=True, rich='auto', vertical_chains=True)[source]¶
Alias for write_network_text
- property shape¶
Returns: None | Tuple[int | None, …]
- prepare()[source]¶
If metadata is missing, perform minimal IO operations in order to prepopulate metadata that could help us better optimize the operation tree.
- Returns:
DelayedOperation
- finalize(prepare=True, optimize=True, **kwargs)[source]¶
Evaluate the operation tree in full.
- Parameters:
prepare (bool) – ensure prepare is called to ensure metadata exists if possible before optimizing. Defaults to True.
optimize (bool) – ensure the graph is optimized before loading. Default to True.
**kwargs – for backwards compatibility, these will allow for in-place modification of select nested parameters.
- Returns:
ArrayLike
Notes
Do not overload this method. Overload
DelayedOperation._finalize()instead.
- class delayed_image.delayed_base.DelayedNaryOperation(parts)[source]¶
Bases:
DelayedOperationFor operations that have multiple input arrays
- class delayed_image.delayed_base.DelayedUnaryOperation(subdata)[source]¶
Bases:
DelayedOperationFor operations that have a single input array