| 4571 | |
| 4572 | |
| 4573 | def test_mixed_dask_array_operations_errors(): |
| 4574 | df = pd.DataFrame({"x": [1, 2, 3, 4, 5]}, index=[4, 5, 6, 7, 8]) |
| 4575 | ddf = dd.from_pandas(df, npartitions=2) |
| 4576 | |
| 4577 | x = da.arange(5, chunks=((1, 4),)) |
| 4578 | x._chunks = ((np.nan, np.nan),) |
| 4579 | |
| 4580 | with pytest.raises(ValueError): |
| 4581 | (ddf.x + x).compute() |
| 4582 | |
| 4583 | x = da.arange(5, chunks=((2, 2, 1),)) |
| 4584 | with pytest.raises(ValueError) as info: |
| 4585 | ddf.x + x |
| 4586 | |
| 4587 | assert "add" in str(info.value) or "different numbers" in str(info.value) |
| 4588 | |
| 4589 | |
| 4590 | def test_mixed_dask_array_multi_dimensional(): |