(self)
| 1306 | self.dv.tail(-3) |
| 1307 | |
| 1308 | def test_thin(self) -> None: |
| 1309 | assert_equal(self.dv.isel(x=slice(None, None, 5)), self.dv.thin(x=5)) |
| 1310 | assert_equal( |
| 1311 | self.dv.isel({dim: slice(None, None, 6) for dim in self.dv.dims}), |
| 1312 | self.dv.thin(6), |
| 1313 | ) |
| 1314 | with pytest.raises(TypeError, match=r"either dict-like or a single int"): |
| 1315 | self.dv.thin([3]) # type: ignore[arg-type] |
| 1316 | with pytest.raises(TypeError, match=r"expected integer type"): |
| 1317 | self.dv.thin(x=3.1) |
| 1318 | with pytest.raises(ValueError, match=r"expected positive int"): |
| 1319 | self.dv.thin(-3) |
| 1320 | with pytest.raises(ValueError, match=r"cannot be zero"): |
| 1321 | self.dv.thin(time=0) |
| 1322 | |
| 1323 | def test_loc(self) -> None: |
| 1324 | self.ds["x"] = ("x", np.array(list("abcdefghij"))) |
nothing calls this directly
no test coverage detected