| 459 | |
| 460 | @pytest.mark.skipif("not dd or not da") |
| 461 | def test_compute_array_dataframe(): |
| 462 | arr = np.arange(100).reshape((10, 10)) |
| 463 | darr = da.from_array(arr, chunks=(5, 5)) + 1 |
| 464 | df = pd.DataFrame({"a": [1, 2, 3, 4], "b": [5, 5, 3, 3]}) |
| 465 | ddf = dd.from_pandas(df, npartitions=2).a + 2 |
| 466 | with pytest.warns(UserWarning, match="mixed.*materialize"): |
| 467 | arr_out, df_out = compute(darr, ddf) |
| 468 | assert np.allclose(arr_out, arr + 1) |
| 469 | dd.utils.assert_eq(df_out, df.a + 2) |
| 470 | |
| 471 | |
| 472 | @pytest.mark.skipif("not dd") |