|
51 | 51 | requires_bottleneck,
|
52 | 52 | requires_cupy,
|
53 | 53 | requires_dask,
|
54 |
| - requires_dask_expr, |
55 | 54 | requires_iris,
|
56 | 55 | requires_numexpr,
|
57 | 56 | requires_pint,
|
@@ -3204,42 +3203,6 @@ def test_align_str_dtype(self) -> None:
|
3204 | 3203 | assert_identical(expected_b, actual_b)
|
3205 | 3204 | assert expected_b.x.dtype == actual_b.x.dtype
|
3206 | 3205 |
|
3207 |
| - def test_broadcast_on_vs_off_global_option_different_dims(self) -> None: |
3208 |
| - xda_1 = xr.DataArray([1], dims="x1") |
3209 |
| - xda_2 = xr.DataArray([1], dims="x2") |
3210 |
| - |
3211 |
| - with xr.set_options(arithmetic_broadcast=True): |
3212 |
| - expected_xda = xr.DataArray([[1.0]], dims=("x1", "x2")) |
3213 |
| - actual_xda = xda_1 / xda_2 |
3214 |
| - assert_identical(actual_xda, expected_xda) |
3215 |
| - |
3216 |
| - with xr.set_options(arithmetic_broadcast=False): |
3217 |
| - with pytest.raises( |
3218 |
| - ValueError, |
3219 |
| - match=re.escape( |
3220 |
| - "Broadcasting is necessary but automatic broadcasting is disabled via " |
3221 |
| - "global option `'arithmetic_broadcast'`. " |
3222 |
| - "Use `xr.set_options(arithmetic_broadcast=True)` to enable automatic broadcasting." |
3223 |
| - ), |
3224 |
| - ): |
3225 |
| - xda_1 / xda_2 |
3226 |
| - |
3227 |
| - @pytest.mark.parametrize("arithmetic_broadcast", [True, False]) |
3228 |
| - def test_broadcast_on_vs_off_global_option_same_dims( |
3229 |
| - self, arithmetic_broadcast: bool |
3230 |
| - ) -> None: |
3231 |
| - # Ensure that no error is raised when arithmetic broadcasting is disabled, |
3232 |
| - # when broadcasting is not needed. The two DataArrays have the same |
3233 |
| - # dimensions of the same size. |
3234 |
| - xda_1 = xr.DataArray([1], dims="x") |
3235 |
| - xda_2 = xr.DataArray([1], dims="x") |
3236 |
| - expected_xda = xr.DataArray([2.0], dims=("x",)) |
3237 |
| - |
3238 |
| - with xr.set_options(arithmetic_broadcast=arithmetic_broadcast): |
3239 |
| - assert_identical(xda_1 + xda_2, expected_xda) |
3240 |
| - assert_identical(xda_1 + np.array([1.0]), expected_xda) |
3241 |
| - assert_identical(np.array([1.0]) + xda_1, expected_xda) |
3242 |
| - |
3243 | 3206 | def test_broadcast_arrays(self) -> None:
|
3244 | 3207 | x = DataArray([1, 2], coords=[("a", [-1, -2])], name="x")
|
3245 | 3208 | y = DataArray([1, 2], coords=[("b", [3, 4])], name="y")
|
@@ -3418,7 +3381,6 @@ def test_to_dataframe_0length(self) -> None:
|
3418 | 3381 | assert len(actual) == 0
|
3419 | 3382 | assert_array_equal(actual.index.names, list("ABC"))
|
3420 | 3383 |
|
3421 |
| - @requires_dask_expr |
3422 | 3384 | @requires_dask
|
3423 | 3385 | def test_to_dask_dataframe(self) -> None:
|
3424 | 3386 | arr_np = np.arange(3 * 4).reshape(3, 4)
|
|
0 commit comments