(self)
| 754 | assert_identical(ds1, ds2) |
| 755 | |
| 756 | def test_coarsen(self): |
| 757 | a1 = self.ds_xr |
| 758 | a2 = self.sp_xr |
| 759 | m1 = a1.coarsen(x=2, boundary="trim").mean() # type: ignore[attr-defined] |
| 760 | m2 = a2.coarsen(x=2, boundary="trim").mean() # type: ignore[attr-defined] |
| 761 | |
| 762 | assert isinstance(m2.data, sparse.SparseArray) |
| 763 | assert np.allclose(m1.data, m2.data.todense()) |
| 764 | |
| 765 | @pytest.mark.xfail(reason="No implementation of np.pad") |
| 766 | def test_rolling(self): |