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

Method find_operations

dask/_expr.py:823–842  ·  view source on GitHub ↗

Search the expression graph for a specific operation type Parameters ---------- operation The operation type to search for. Returns ------- nodes Generator of `operation` instances. Ordering corresponds to a depth-

(self, operation: type | tuple[type])

Source from the content-addressed store, hash-verified

821 yield node
822
823 def find_operations(self, operation: type | tuple[type]) -> Generator[Expr]:
824 """Search the expression graph for a specific operation type
825
826 Parameters
827 ----------
828 operation
829 The operation type to search for.
830
831 Returns
832 -------
833 nodes
834 Generator of `operation` instances. Ordering corresponds
835 to a depth-first search of the expression graph.
836 """
837 assert (
838 isinstance(operation, tuple)
839 and all(issubclass(e, Expr) for e in operation)
840 or issubclass(operation, Expr) # type: ignore[arg-type]
841 ), "`operation` must be an `Expr` subclass)"
842 return (expr for expr in self.walk() if isinstance(expr, operation))
843
844 def __getattr__(self, key):
845 try:

Callers 15

_get_culled_divisionsMethod · 0.80
to_parquetFunction · 0.80
test_parquet_len_filterFunction · 0.80
test_combine_similarFunction · 0.80
test_groupby_split_everyFunction · 0.80
test_groupby_applyFunction · 0.80
test_groupby_transformFunction · 0.80
test_groupby_shiftFunction · 0.80
test_combine_similarFunction · 0.80

Calls 2

walkMethod · 0.95
allFunction · 0.85