MCPcopy
hub / github.com/dask/dask / test_compute_array_dataframe

Function test_compute_array_dataframe

dask/tests/test_base.py:461–469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

459
460@pytest.mark.skipif("not dd or not da")
461def test_compute_array_dataframe():
462 arr = np.arange(100).reshape((10, 10))
463 darr = da.from_array(arr, chunks=(5, 5)) + 1
464 df = pd.DataFrame({"a": [1, 2, 3, 4], "b": [5, 5, 3, 3]})
465 ddf = dd.from_pandas(df, npartitions=2).a + 2
466 with pytest.warns(UserWarning, match="mixed.*materialize"):
467 arr_out, df_out = compute(darr, ddf)
468 assert np.allclose(arr_out, arr + 1)
469 dd.utils.assert_eq(df_out, df.a + 2)
470
471
472@pytest.mark.skipif("not dd")

Callers

nothing calls this directly

Calls 3

computeFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…