dask 2021.10.0

ParametersBackRef
broadcast_dimensions(argpairs, numblocks, sentinels=(1, (1,)), consolidate=None)

Parameters

argpairs : iterable

name, ijk index pairs

numblocks : dict

maps {name: number of blocks}

sentinels : iterable (optional)

values for singleton dimensions

consolidate : func (optional)

use this to reduce each set of common blocks into a smaller set

Find block dimensions from arguments

Examples

This example is valid syntax, but we were not able to check execution
>>> argpairs = [('x', 'ij'), ('y', 'ji')]
... numblocks = {'x': (2, 3), 'y': (3, 2)}
... broadcast_dimensions(argpairs, numblocks) {'i': 2, 'j': 3}

Supports numpy broadcasting rules

This example is valid syntax, but we were not able to check execution
>>> argpairs = [('x', 'ij'), ('y', 'ij')]
... numblocks = {'x': (2, 1), 'y': (1, 3)}
... broadcast_dimensions(argpairs, numblocks) {'i': 2, 'j': 3}

Works in other contexts too

This example is valid syntax, but we were not able to check execution
>>> argpairs = [('x', 'ij'), ('y', 'ij')]
... d = {'x': ('Hello', 1), 'y': (1, (2, 3))}
... broadcast_dimensions(argpairs, d) {'i': 'Hello', 'j': (2, 3)}
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.blockwise.broadcast_dimensions

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/blockwise.py#1468
type: <class 'function'>
Commit: