html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/6425#issuecomment-1082233028,https://api.github.com/repos/pydata/xarray/issues/6425,1082233028,IC_kwDOAMm_X85AgZDE,35968931,2022-03-29T18:28:15Z,2022-03-30T09:19:05Z,MEMBER,"This change seems to be enough to get the behaviour @jbusecke wants without breaking any existing tests:
```diff
diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py
index 855718cf..21fb0203 100644
--- a/xarray/core/dataset.py
+++ b/xarray/core/dataset.py
@@ -7228,6 +7228,7 @@ class Dataset(DataWithCoords, DatasetReductions, DatasetArithmetic, Mapping):
) = None,
end_values: int | tuple[int, int] | Mapping[Any, tuple[int, int]] | None = None,
reflect_type: str = None,
+ coord_mode: str = None,
**pad_width_kwargs: Any,
) -> Dataset:
""""""Pad this dataset along one or more dimensions.
@@ -7304,6 +7305,7 @@ class Dataset(DataWithCoords, DatasetReductions, DatasetArithmetic, Mapping):
default with an unaltered reflection around the edge value. For
the ""odd"" style, the extended part of the array is created by
subtracting the reflected values from two times the edge value.
+ coord_mode : str, default: mode
**pad_width_kwargs
The keyword arguments form of ``pad_width``.
One of ``pad_width`` or ``pad_width_kwargs`` must be provided.
@@ -7339,7 +7341,7 @@ class Dataset(DataWithCoords, DatasetReductions, DatasetArithmetic, Mapping):
pad_width = either_dict_or_kwargs(pad_width, pad_width_kwargs, ""pad"")
if mode in (""edge"", ""reflect"", ""symmetric"", ""wrap""):
- coord_pad_mode = mode
+ coord_pad_mode = coord_mode if coord_mode is not None else mode
coord_pad_options = {
""stat_length"": stat_length,
""constant_values"": constant_values,
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1185232773