From a3d5f8af4c2c655bfe16e15affe73bb8590163ec Mon Sep 17 00:00:00 2001 From: Lukas Pilz Date: Wed, 2 Feb 2022 11:08:22 +0100 Subject: [PATCH 1/2] Amended docstring to reflect the actual behaviour of Dataset.map --- xarray/core/dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 29e8de39f7a..0c38c57d089 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -5115,9 +5115,9 @@ def map( to transform each DataArray `x` in this dataset into another DataArray. keep_attrs : bool, optional - If True, the dataset's attributes (`attrs`) will be copied from - the original object to the new one. If False, the new object will - be returned without attributes. + If True, both the dataset's and variables' attributes (`attrs`) will be + copied from the original objects to the new ones. If False, the new dataset + will be returned without attributes. args : tuple, optional Positional arguments passed on to `func`. **kwargs : Any From 0dacffa52cd3f32d8871c87369f5269743f46e0b Mon Sep 17 00:00:00 2001 From: Lukas Pilz Date: Wed, 2 Feb 2022 13:58:59 +0100 Subject: [PATCH 2/2] Update --- xarray/core/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 0c38c57d089..b9531426433 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -5117,7 +5117,7 @@ def map( keep_attrs : bool, optional If True, both the dataset's and variables' attributes (`attrs`) will be copied from the original objects to the new ones. If False, the new dataset - will be returned without attributes. + and variables will be returned without copying the attributes. args : tuple, optional Positional arguments passed on to `func`. **kwargs : Any