(da)
| 6999 | |
| 7000 | @pytest.mark.parametrize("da", ("repeating_ints",), indirect=True) |
| 7001 | def test_isin(da) -> None: |
| 7002 | expected = DataArray( |
| 7003 | np.asarray([[0, 0, 0], [1, 0, 0]]), |
| 7004 | dims=list("yx"), |
| 7005 | coords={"x": list("abc"), "y": list("de")}, |
| 7006 | ).astype("bool") |
| 7007 | |
| 7008 | result = da.isin([3]).sel(y=list("de"), z=0) |
| 7009 | assert_equal(result, expected) |
| 7010 | |
| 7011 | expected = DataArray( |
| 7012 | np.asarray([[0, 0, 1], [1, 0, 0]]), |
| 7013 | dims=list("yx"), |
| 7014 | coords={"x": list("abc"), "y": list("de")}, |
| 7015 | ).astype("bool") |
| 7016 | result = da.isin([2, 3]).sel(y=list("de"), z=0) |
| 7017 | assert_equal(result, expected) |
| 7018 | |
| 7019 | |
| 7020 | def test_raise_no_warning_for_nan_in_binary_ops() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…