MCPcopy
hub / github.com/dask/dask / test_Series_from_dask_array

Function test_Series_from_dask_array

dask/dataframe/io/tests/test_io.py:344–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342
343
344def test_Series_from_dask_array():
345 x = da.ones(10, chunks=4)
346 pser = pd.Series(np.ones(10), name="a")
347
348 ser = dd.from_dask_array(x, "a")
349 assert_eq(ser, pser)
350
351 # Not passing a name should result in the name == None
352 pser = pd.Series(np.ones(10))
353 ser = dd.from_dask_array(x)
354 assert_eq(ser, pser)
355
356 # dd.from_array should re-route to from_dask_array
357 ser2 = dd.from_array(x)
358 assert_eq(ser, ser2)
359
360
361@pytest.mark.parametrize("as_frame", [True, False])

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
onesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…