(as_frame)
| 2799 | |
| 2800 | @pytest.mark.parametrize("as_frame", [False, True]) |
| 2801 | def test_to_dask_array_unknown(as_frame): |
| 2802 | s = pd.Series([1, 2, 3, 4, 5], name="foo") |
| 2803 | a = dd.from_pandas(s, npartitions=2) |
| 2804 | |
| 2805 | if as_frame: |
| 2806 | a = a.to_frame() |
| 2807 | |
| 2808 | result = a.to_dask_array() |
| 2809 | assert isinstance(result, da.Array) |
| 2810 | result = result.chunks |
| 2811 | |
| 2812 | if as_frame: |
| 2813 | assert len(result) == 2 |
| 2814 | assert result[1] == (1,) |
| 2815 | else: |
| 2816 | assert len(result) == 1 |
| 2817 | |
| 2818 | result = result[0] |
| 2819 | assert len(result) == 2 |
| 2820 | assert all(np.isnan(x) for x in result) |
| 2821 | |
| 2822 | |
| 2823 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…