(weights, expected)
| 502 | ("weights", "expected"), (([4, 6], 0), ([1, 0], np.nan), ([0, 0], np.nan)) |
| 503 | ) |
| 504 | def test_weighted_std_nan(weights, expected): |
| 505 | da = DataArray([np.nan, 2]) |
| 506 | weights = DataArray(weights) |
| 507 | expected = DataArray(expected) |
| 508 | |
| 509 | result = da.weighted(weights).std() |
| 510 | |
| 511 | assert_equal(expected, result) |
| 512 | |
| 513 | |
| 514 | def test_weighted_std_bool(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…