dask 2021.10.0

NotesBackRef
compute_chunk_sizes(self)

Notes

This function modifies the Dask array in-place.

Compute the chunk sizes for a Dask array. This is especially useful when the chunk sizes are unknown (e.g., when indexing one Dask array with another).

Examples

This example is valid syntax, but we were not able to check execution
>>> import dask.array as da
... import numpy as np
... x = da.from_array([-2, -1, 0, 1, 2], chunks=2)
... x.chunks ((2, 2, 1),)
This example is valid syntax, but we were not able to check execution
>>> y = x[x <= 0]
... y.chunks ((nan, nan, nan),)
This example is valid syntax, but we were not able to check execution
>>> y.compute_chunk_sizes()  # in-place computation
dask.array<getitem, shape=(3,), dtype=int64, chunksize=(2,), chunktype=numpy.ndarray>
This example is valid syntax, but we were not able to check execution
>>> y.chunks
((2, 1, 0),)
See :

Back References

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

dask.array.core.Array.compute_chunk_sizes dask.array.core.to_zarr

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#1303
type: <class 'function'>
Commit: