
Reduction over named dims. Barrier: forces materialisation of its inputs.
ReduceNode.RdCreated by reduce_over(). op is normally one of the named
reductions "sum", "mean", "min", "max", "prod", "median",
"quantile", "sd", "var", "count", "any", "all": the planner needs op
identity to decide algebraic decomposition and output dtype, and
the executor maps it to the ops vocabulary. A CUSTOM reducer may
instead be supplied as fn (a length-1 list holding an anvl function
fn(x, dims) that collapses dims), with op = "custom"; the
executor calls it directly. A custom reducer cannot be decomposed
across spatial chunks, so it is supported over the t/band axes
(each spatial chunk holds the full axis), not over x/y.
Arguments
- id
Integer node id (assigned by
graph_add()).- parents
Integer ids of parent nodes (may be empty).
- grid
Output
GridSpecof this node.- role
Optional semantic role tag (e.g. "mask", set by
mask()). Pure metadata: never read by the planner or executors; surfaced bydraw()andplan_view().- op
Reduction name, e.g. "mean" (one of the names above), or "custom".
- over
Names of dims to reduce over.
- nan_rm
Skip NaN (nodata) values? (Named ops only; a custom
fnhandles NaN itself.)- fn
Length-0 (named op) or length-1 list holding a custom anvl reducer
fn(x, dims).