(self)
| 1460 | assert_allclose(expected, actual) |
| 1461 | |
| 1462 | def test_groupby_count(self) -> None: |
| 1463 | array = DataArray( |
| 1464 | [0, 0, np.nan, np.nan, 0, 0], |
| 1465 | coords={"cat": ("x", ["a", "b", "b", "c", "c", "c"])}, |
| 1466 | dims="x", |
| 1467 | ) |
| 1468 | actual = array.groupby("cat").count() |
| 1469 | expected = DataArray([1, 1, 2], coords=[("cat", ["a", "b", "c"])]) |
| 1470 | assert_identical(actual, expected) |
| 1471 | |
| 1472 | @pytest.mark.parametrize("shortcut", [True, False]) |
| 1473 | @pytest.mark.parametrize("keep_attrs", [None, True, False]) |
nothing calls this directly
no test coverage detected