Skip to content

Commit

Permalink
any,all
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Nov 6, 2021
1 parent ac85e72 commit d238459
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/requirements/environment-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ dependencies:
- pip:
- numbagg
- numpy_groupies
- dask_groupby
- git+https://github.com:dcherian/dask_groupby.git
2 changes: 1 addition & 1 deletion ci/requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ dependencies:
- pip:
- numbagg
- numpy_groupies
- dask_groupby
- git+https://github.com:dcherian/dask_groupby.git
40 changes: 40 additions & 0 deletions xarray/core/_reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ def all(
da (time) bool True True True True True False
>>> ds.groupby("labels").all()
<xarray.Dataset>
Dimensions: (labels: 3)
Coordinates:
* labels (labels) object 'a' 'b' 'c'
Data variables:
da (labels) bool False True True
See Also
--------
Expand Down Expand Up @@ -249,6 +255,12 @@ def any(
da (time) bool True True True True True False
>>> ds.groupby("labels").any()
<xarray.Dataset>
Dimensions: (labels: 3)
Coordinates:
* labels (labels) object 'a' 'b' 'c'
Data variables:
da (labels) bool True True True
See Also
--------
Expand Down Expand Up @@ -1167,6 +1179,12 @@ def all(
da (time) bool True True True True True False
>>> ds.resample(time="3M").all()
<xarray.Dataset>
Dimensions: (time: 3)
Coordinates:
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
Data variables:
da (time) bool True True False
See Also
--------
Expand Down Expand Up @@ -1245,6 +1263,12 @@ def any(
da (time) bool True True True True True False
>>> ds.resample(time="3M").any()
<xarray.Dataset>
Dimensions: (time: 3)
Coordinates:
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
Data variables:
da (time) bool True True True
See Also
--------
Expand Down Expand Up @@ -2167,6 +2191,10 @@ def all(
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
>>> da.groupby("labels").all()
<xarray.DataArray (labels: 3)>
array([False, True, True])
Coordinates:
* labels (labels) object 'a' 'b' 'c'
See Also
--------
Expand Down Expand Up @@ -2241,6 +2269,10 @@ def any(
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
>>> da.groupby("labels").any()
<xarray.DataArray (labels: 3)>
array([ True, True, True])
Coordinates:
* labels (labels) object 'a' 'b' 'c'
See Also
--------
Expand Down Expand Up @@ -3089,6 +3121,10 @@ def all(
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
>>> da.resample(time="3M").all()
<xarray.DataArray (time: 3)>
array([ True, True, False])
Coordinates:
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
See Also
--------
Expand Down Expand Up @@ -3163,6 +3199,10 @@ def any(
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
>>> da.resample(time="3M").any()
<xarray.DataArray (time: 3)>
array([ True, True, True])
Coordinates:
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
See Also
--------
Expand Down

0 comments on commit d238459

Please sign in to comment.