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

Function test_asanyarray_dataframe

dask/array/tests/test_array_core.py:3131–3148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3129
3130
3131def test_asanyarray_dataframe():
3132 pd = pytest.importorskip("pandas")
3133 dd = pytest.importorskip("dask.dataframe")
3134
3135 df = pd.DataFrame({"x": [1, 2, 3]})
3136 ddf = dd.from_pandas(df, npartitions=2)
3137
3138 x = np.asanyarray(df)
3139 dx = da.asanyarray(ddf)
3140 assert isinstance(dx, da.Array)
3141
3142 assert_eq(x, dx)
3143
3144 x = np.asanyarray(df.x)
3145 dx = da.asanyarray(ddf.x)
3146 assert isinstance(dx, da.Array)
3147
3148 assert_eq(x, dx)
3149
3150
3151def test_asanyarray_datetime64():

Callers

nothing calls this directly

Calls 1

assert_eqFunction · 0.90

Tested by

no test coverage detected