(meta, as_frame, lengths)
| 2829 | ], |
| 2830 | ) |
| 2831 | def test_to_dask_array(meta, as_frame, lengths): |
| 2832 | s = pd.Series([1, 2, 3, 4, 5], name="foo", dtype="i4") |
| 2833 | a = dd.from_pandas(s, chunksize=2) |
| 2834 | |
| 2835 | if as_frame: |
| 2836 | a = a.to_frame() |
| 2837 | |
| 2838 | result = a.to_dask_array(lengths=lengths, meta=meta) |
| 2839 | assert isinstance(result, da.Array) |
| 2840 | |
| 2841 | expected_chunks = ((2, 2, 1),) |
| 2842 | |
| 2843 | if as_frame: |
| 2844 | expected_chunks = expected_chunks + ((1,),) |
| 2845 | |
| 2846 | assert result.chunks == expected_chunks |
| 2847 | |
| 2848 | |
| 2849 | def test_to_dask_array_single_partition(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…