(weights, expected)
| 83 | (([1, 2], 3), ([2, 0], 2), ([0, 0], np.nan), ([-1, 1], np.nan)), |
| 84 | ) |
| 85 | def test_weighted_sum_of_weights_no_nan(weights, expected): |
| 86 | da = DataArray([1, 2]) |
| 87 | weights = DataArray(weights) |
| 88 | result = da.weighted(weights).sum_of_weights() |
| 89 | |
| 90 | expected = DataArray(expected) |
| 91 | |
| 92 | assert_equal(expected, result) |
| 93 | |
| 94 | |
| 95 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…