MCPcopy Create free account
hub / github.com/dask/dask / estimate_graph_size

Function estimate_graph_size

dask/array/rechunk.py:418–429  ·  view source on GitHub ↗

Estimate the graph size during a rechunk computation.

(old_chunks, new_chunks)

Source from the content-addressed store, hash-verified

416
417
418def estimate_graph_size(old_chunks, new_chunks):
419 """Estimate the graph size during a rechunk computation."""
420 # Estimate the number of intermediate blocks that will be produced
421 # (we don't use intersect_chunks() which is much more expensive)
422 crossed_size = reduce(
423 mul,
424 (
425 (len(oc) + len(nc) - 1 if oc != nc else len(oc))
426 for oc, nc in zip(old_chunks, new_chunks)
427 ),
428 )
429 return crossed_size
430
431
432def divide_to_width(desired_chunks, max_width):

Callers 2

find_split_rechunkFunction · 0.85
plan_rechunkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected