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

Function test_to_dask_array_single_partition

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

Source from the content-addressed store, hash-verified

2851
2852
2853def test_to_dask_array_single_partition():
2854 s = pd.Series([1, 2, 3, 4, 5], name="foo", dtype="i4")
2855 a = dd.from_pandas(s)
2856
2857 result = a.to_dask_array(lengths=True)
2858 assert isinstance(result, da.Array)
2859 expected_chunks = (s.shape,)
2860 assert result.chunks == expected_chunks
2861 da.assert_eq(s.values, result)
2862
2863
2864def test_apply():

Callers

nothing calls this directly

Calls 1

to_dask_arrayMethod · 0.80

Tested by

no test coverage detected