()
| 34 | |
| 35 | |
| 36 | def test_binary(): |
| 37 | args: list[int | float | npt.NDArray | xr.Variable | xr.DataArray | xr.Dataset] = [ |
| 38 | 0, |
| 39 | np.zeros(2), |
| 40 | xr.Variable(["x"], [0, 0]), |
| 41 | xr.DataArray([0, 0], dims="x"), |
| 42 | xr.Dataset({"y": ("x", [0, 0])}), |
| 43 | ] |
| 44 | for n, t1 in enumerate(args): |
| 45 | for t2 in args[n:]: |
| 46 | assert_identical(t2 + 1, np.maximum(t1, t2 + 1)) |
| 47 | assert_identical(t2 + 1, np.maximum(t2, t1 + 1)) |
| 48 | assert_identical(t2 + 1, np.maximum(t1 + 1, t2)) |
| 49 | assert_identical(t2 + 1, np.maximum(t2 + 1, t1)) |
| 50 | |
| 51 | |
| 52 | def test_binary_out(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…