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

Function test_asarray_dask_dataframe

dask/array/tests/test_array_core.py:3072–3085  ·  view source on GitHub ↗
(asarray)

Source from the content-addressed store, hash-verified

3070
3071@pytest.mark.parametrize("asarray", [da.asarray, da.asanyarray])
3072def test_asarray_dask_dataframe(asarray):
3073 # https://github.com/dask/dask/issues/3885
3074 pd = pytest.importorskip("pandas")
3075 dd = pytest.importorskip("dask.dataframe")
3076
3077 s = dd.from_pandas(pd.Series([1, 2, 3, 4]), 2)
3078 result = asarray(s)
3079 expected = s.values
3080 assert_eq(result, expected)
3081
3082 df = s.to_frame(name="s")
3083 result = asarray(df)
3084 expected = df.values
3085 assert_eq(result, expected)
3086
3087
3088@pytest.mark.parametrize("asarray", [da.asarray, da.asanyarray])

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
asarrayFunction · 0.50
to_frameMethod · 0.45

Tested by

no test coverage detected