Skip to content

Commit d238459

Browse files
committed
any,all
1 parent ac85e72 commit d238459

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

ci/requirements/environment-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ dependencies:
4444
- pip:
4545
- numbagg
4646
- numpy_groupies
47-
- dask_groupby
47+
- git+https://github.com:dcherian/dask_groupby.git

ci/requirements/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ dependencies:
4848
- pip:
4949
- numbagg
5050
- numpy_groupies
51-
- dask_groupby
51+
- git+https://github.com:dcherian/dask_groupby.git

xarray/core/_reductions.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ def all(
171171
da (time) bool True True True True True False
172172
173173
>>> ds.groupby("labels").all()
174+
<xarray.Dataset>
175+
Dimensions: (labels: 3)
176+
Coordinates:
177+
* labels (labels) object 'a' 'b' 'c'
178+
Data variables:
179+
da (labels) bool False True True
174180
175181
See Also
176182
--------
@@ -249,6 +255,12 @@ def any(
249255
da (time) bool True True True True True False
250256
251257
>>> ds.groupby("labels").any()
258+
<xarray.Dataset>
259+
Dimensions: (labels: 3)
260+
Coordinates:
261+
* labels (labels) object 'a' 'b' 'c'
262+
Data variables:
263+
da (labels) bool True True True
252264
253265
See Also
254266
--------
@@ -1167,6 +1179,12 @@ def all(
11671179
da (time) bool True True True True True False
11681180
11691181
>>> ds.resample(time="3M").all()
1182+
<xarray.Dataset>
1183+
Dimensions: (time: 3)
1184+
Coordinates:
1185+
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
1186+
Data variables:
1187+
da (time) bool True True False
11701188
11711189
See Also
11721190
--------
@@ -1245,6 +1263,12 @@ def any(
12451263
da (time) bool True True True True True False
12461264
12471265
>>> ds.resample(time="3M").any()
1266+
<xarray.Dataset>
1267+
Dimensions: (time: 3)
1268+
Coordinates:
1269+
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
1270+
Data variables:
1271+
da (time) bool True True True
12481272
12491273
See Also
12501274
--------
@@ -2167,6 +2191,10 @@ def all(
21672191
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
21682192
21692193
>>> da.groupby("labels").all()
2194+
<xarray.DataArray (labels: 3)>
2195+
array([False, True, True])
2196+
Coordinates:
2197+
* labels (labels) object 'a' 'b' 'c'
21702198
21712199
See Also
21722200
--------
@@ -2241,6 +2269,10 @@ def any(
22412269
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
22422270
22432271
>>> da.groupby("labels").any()
2272+
<xarray.DataArray (labels: 3)>
2273+
array([ True, True, True])
2274+
Coordinates:
2275+
* labels (labels) object 'a' 'b' 'c'
22442276
22452277
See Also
22462278
--------
@@ -3089,6 +3121,10 @@ def all(
30893121
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
30903122
30913123
>>> da.resample(time="3M").all()
3124+
<xarray.DataArray (time: 3)>
3125+
array([ True, True, False])
3126+
Coordinates:
3127+
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
30923128
30933129
See Also
30943130
--------
@@ -3163,6 +3199,10 @@ def any(
31633199
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
31643200
31653201
>>> da.resample(time="3M").any()
3202+
<xarray.DataArray (time: 3)>
3203+
array([ True, True, True])
3204+
Coordinates:
3205+
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
31663206
31673207
See Also
31683208
--------

0 commit comments

Comments
 (0)