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