()
| 107 | |
| 108 | |
| 109 | def test_weighted_sum_of_weights_bool(): |
| 110 | # https://github.com/pydata/xarray/issues/4074 |
| 111 | |
| 112 | da = DataArray([1, 2]) |
| 113 | weights = DataArray([True, True]) |
| 114 | result = da.weighted(weights).sum_of_weights() |
| 115 | |
| 116 | expected = DataArray(2) |
| 117 | |
| 118 | assert_equal(expected, result) |
| 119 | |
| 120 | |
| 121 | @pytest.mark.parametrize("da", ([1.0, 2], [1, np.nan], [np.nan, np.nan])) |
nothing calls this directly
no test coverage detected
searching dependent graphs…