From 3059ab65444af9fa9aca831b790061f016094631 Mon Sep 17 00:00:00 2001 From: pmallas <6051395+pmallas@users.noreply.github.com> Date: Wed, 16 Oct 2019 18:50:02 -0400 Subject: [PATCH 1/2] Update where docstring to make return value type more clear The where docstring was a little confusing to me. I misunderstood "Same type as caller' to mean the values in the xarray not the xarray itself. I think this small change will clean it up for most users. Thanks. --- xarray/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/common.py b/xarray/core/common.py index a762f7fbed9..481dd12b113 100644 --- a/xarray/core/common.py +++ b/xarray/core/common.py @@ -1069,7 +1069,7 @@ def where(self, cond, other=dtypes.NA, drop: bool = False): Returns ------- - Same type as caller. + Same xarray type as caller. Xarray.values returned as float64. Examples -------- From 84a916ce2f476155eb6fbdad0762c374cbafbb1f Mon Sep 17 00:00:00 2001 From: pmallas <6051395+pmallas@users.noreply.github.com> Date: Thu, 17 Oct 2019 10:05:25 -0400 Subject: [PATCH 2/2] Update xarray/core/common.py Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> --- xarray/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/common.py b/xarray/core/common.py index 481dd12b113..d23428eca62 100644 --- a/xarray/core/common.py +++ b/xarray/core/common.py @@ -1069,7 +1069,7 @@ def where(self, cond, other=dtypes.NA, drop: bool = False): Returns ------- - Same xarray type as caller. Xarray.values returned as float64. + Same xarray type as caller, with dtype float64. Examples --------