MCPcopy
hub / github.com/dask/dask / test_avoid_alignment

Function test_avoid_alignment

dask/dataframe/dask_expr/tests/test_collection.py:2072–2086  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2070
2071
2072def test_avoid_alignment():
2073 a = pd.DataFrame({"x": range(100)})
2074 da = from_pandas(a, npartitions=4)
2075
2076 b = pd.DataFrame({"y": range(100)})
2077 b["z"] = b.y * 2
2078 db = from_pandas(b, npartitions=3)
2079
2080 # Give correct results even when misaligned
2081 assert_eq(a.x + b.y, da.x + db.y)
2082
2083 assert not any(isinstance(ex, OpAlignPartitions) for ex in (db.y + db.z).walk())
2084 assert not any(
2085 isinstance(ex, OpAlignPartitions) for ex in (da.x + db.y.sum()).walk()
2086 )
2087
2088
2089def test_mixed_array_op(df, pdf):

Callers

nothing calls this directly

Calls 5

from_pandasFunction · 0.90
assert_eqFunction · 0.90
anyFunction · 0.85
walkMethod · 0.45
sumMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…