(self)
| 1827 | assert_identical(actual, expected) |
| 1828 | |
| 1829 | def test_groupby_bins_sort(self) -> None: |
| 1830 | data = xr.DataArray( |
| 1831 | np.arange(100), dims="x", coords={"x": np.linspace(-100, 100, num=100)} |
| 1832 | ) |
| 1833 | binned_mean = data.groupby_bins("x", bins=11).mean() |
| 1834 | assert binned_mean.to_index().is_monotonic_increasing |
| 1835 | |
| 1836 | with xr.set_options(use_flox=True): |
| 1837 | actual = data.groupby_bins("x", bins=11).count() |
| 1838 | with xr.set_options(use_flox=False): |
| 1839 | expected = data.groupby_bins("x", bins=11).count() |
| 1840 | assert_identical(actual, expected) |
| 1841 | |
| 1842 | def test_groupby_assign_coords(self) -> None: |
| 1843 | array = DataArray([1, 2, 3, 4], {"c": ("x", [0, 0, 1, 1])}, dims="x") |
nothing calls this directly
no test coverage detected