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

Function test_mixed_dask_array_multi_dimensional

dask/dataframe/tests/test_dataframe.py:4569–4580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4567
4568
4569def test_mixed_dask_array_multi_dimensional():
4570 df = pd.DataFrame(
4571 {"x": [1, 2, 3, 4, 5], "y": [5.0, 6.0, 7.0, 8.0, 9.0]}, columns=["x", "y"]
4572 )
4573 ddf = dd.from_pandas(df, npartitions=2)
4574
4575 x = (df.values + 1).astype(float)
4576 dx = (ddf.values + 1).astype(float)
4577
4578 assert_eq(ddf + dx + 1, df + x + 1)
4579 assert_eq(ddf + dx.rechunk((None, 1)) + 1, df + x + 1)
4580 assert_eq(ddf[["y", "x"]] + dx + 1, df[["y", "x"]] + x + 1)
4581
4582
4583def test_meta_raises():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
astypeMethod · 0.45
rechunkMethod · 0.45

Tested by

no test coverage detected