MCPcopy
hub / github.com/dask/dask / test_optimize_fusion_repeat

Function test_optimize_fusion_repeat

dask/dataframe/dask_expr/tests/test_fusion.py:76–92  ·  view source on GitHub ↗
(df)

Source from the content-addressed store, hash-verified

74
75
76def test_optimize_fusion_repeat(df):
77 # Test that we can optimize a collection
78 # more than once, and fusion still works
79
80 original = df.copy()
81
82 # some generic elemwise operations
83 df["x"] += 1
84 df["z"] = df.y
85 df += 2
86
87 # repeatedly call optimize after doing new fusable things
88 fused = optimize(optimize(optimize(df) + 2).x)
89
90 # from_pandas is not fused together
91 assert len(fused.dask) - 10 == fused.npartitions == original.npartitions
92 assert_eq(fused, df.x + 2)
93
94
95def test_optimize_fusion_broadcast(df):

Callers

nothing calls this directly

Calls 3

optimizeFunction · 0.90
assert_eqFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…