dask 2021.10.0

ParametersReturnsBackRef
unify_chunks(*args, **kwargs)

This utility function is used within other common operations like dask.array.core.map_blocks and dask.array.core.blockwise . It is not commonly used by end-users directly.

Parameters

*args: sequence of Array, index pairs :

Sequence like (x, 'ij', y, 'jk', z, 'i')

Returns

chunkss : dict

Map like {index: chunks}.

arrays : list

List of rechunked arrays.

Unify chunks across a sequence of arrays

See Also

common_blockdim

Examples

This example is valid syntax, but we were not able to check execution
>>> import dask.array as da
... x = da.ones(10, chunks=((5, 2, 3),))
... y = da.ones(10, chunks=((2, 3, 5),))
... chunkss, arrays = unify_chunks(x, 'i', y, 'i')
... chunkss {'i': (2, 3, 2, 3)}
This example is valid syntax, but we were not able to check execution
>>> x = da.ones((100, 10), chunks=(20, 5))
... y = da.ones((10, 100), chunks=(4, 50))
... chunkss, arrays = unify_chunks(x, 'ij', y, 'jk', 'constant', None)
... chunkss # doctest: +SKIP {'k': (50, 50), 'i': (20, 20, 20, 20, 20), 'j': (4, 1, 3, 2)}
This example is valid syntax, but we were not able to check execution
>>> unify_chunks(0, None)
({}, [0])
See :

Back References

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

dask.array.core.unify_chunks

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/array/core.py#3593
type: <class 'function'>
Commit: