(self)
| 652 | assert np.all(b2.coords["x"].data == ["a", "b", "c", "d", "e"]) |
| 653 | |
| 654 | def test_concat(self): |
| 655 | ds1 = xr.Dataset(data_vars={"d": self.sp_xr}) |
| 656 | ds2 = xr.Dataset(data_vars={"d": self.sp_xr}) |
| 657 | ds3 = xr.Dataset(data_vars={"d": self.sp_xr}) |
| 658 | out = xr.concat([ds1, ds2, ds3], dim="x") |
| 659 | assert_sparse_equal( |
| 660 | out["d"].data, |
| 661 | sparse.concatenate([self.sp_ar, self.sp_ar, self.sp_ar], axis=0), |
| 662 | ) |
| 663 | |
| 664 | out_concat = xr.concat([self.sp_xr, self.sp_xr, self.sp_xr], dim="y") |
| 665 | assert_sparse_equal( |
| 666 | out_concat.data, |
| 667 | sparse.concatenate([self.sp_ar, self.sp_ar, self.sp_ar], axis=1), |
| 668 | ) |
| 669 | |
| 670 | def test_stack(self): |
| 671 | arr = make_xrarray({"w": 2, "x": 3, "y": 4}) |
nothing calls this directly
no test coverage detected