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

Method _divisions

dask/dataframe/dask_expr/_expr.py:587–600  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

585 return dep.npartitions == 1 and dep.ndim < self.ndim
586
587 def _divisions(self):
588 # This is an issue. In normal Dask we re-divide everything in a step
589 # which combines divisions and graph.
590 # We either have to create a new Align layer (ok) or combine divisions
591 # and graph into a single operation.
592 dependencies = self.dependencies()
593 for arg in dependencies:
594 if not self._broadcast_dep(arg):
595 assert arg.divisions == dependencies[0].divisions, (
596 "Mismatched divisions between multiple Blockwise dependencies. "
597 f"Expected {dependencies[0].divisions}. Got {arg.divisions}. "
598 "This may happen when a collection is passed to `meta=`."
599 )
600 return dependencies[0].divisions
601
602 @functools.cached_property
603 def _name(self):

Callers

nothing calls this directly

Calls 2

_broadcast_depMethod · 0.95
dependenciesMethod · 0.45

Tested by

no test coverage detected