@@ -2315,6 +2315,19 @@ def cumprod(
2315
2315
class DatasetGroupByAggregations :
2316
2316
_obj : Dataset
2317
2317
2318
+ def _reduce_without_squeeze_warn (
2319
+ self ,
2320
+ func : Callable [..., Any ],
2321
+ dim : Dims = None ,
2322
+ * ,
2323
+ axis : int | Sequence [int ] | None = None ,
2324
+ keep_attrs : bool | None = None ,
2325
+ keepdims : bool = False ,
2326
+ shortcut : bool = True ,
2327
+ ** kwargs : Any ,
2328
+ ) -> Dataset :
2329
+ raise NotImplementedError ()
2330
+
2318
2331
def reduce (
2319
2332
self ,
2320
2333
func : Callable [..., Any ],
@@ -3829,6 +3842,19 @@ def cumprod(
3829
3842
class DatasetResampleAggregations :
3830
3843
_obj : Dataset
3831
3844
3845
+ def _reduce_without_squeeze_warn (
3846
+ self ,
3847
+ func : Callable [..., Any ],
3848
+ dim : Dims = None ,
3849
+ * ,
3850
+ axis : int | Sequence [int ] | None = None ,
3851
+ keep_attrs : bool | None = None ,
3852
+ keepdims : bool = False ,
3853
+ shortcut : bool = True ,
3854
+ ** kwargs : Any ,
3855
+ ) -> Dataset :
3856
+ raise NotImplementedError ()
3857
+
3832
3858
def reduce (
3833
3859
self ,
3834
3860
func : Callable [..., Any ],
@@ -5112,21 +5138,21 @@ def median(
5112
5138
5113
5139
>>> ds.resample(time="3M").median()
5114
5140
<xarray.Dataset>
5115
- Dimensions: (__resample_dim__ : 3)
5141
+ Dimensions: (time : 3)
5116
5142
Coordinates:
5117
- * __resample_dim__ (__resample_dim__ ) datetime64[ns] 2001-01-31 ... 2001-0...
5143
+ * time (time ) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
5118
5144
Data variables:
5119
- da (__resample_dim__ ) float64 1.0 2.0 2.0
5145
+ da (time ) float64 1.0 2.0 2.0
5120
5146
5121
5147
Use ``skipna`` to control whether NaNs are ignored.
5122
5148
5123
5149
>>> ds.resample(time="3M").median(skipna=False)
5124
5150
<xarray.Dataset>
5125
- Dimensions: (__resample_dim__ : 3)
5151
+ Dimensions: (time : 3)
5126
5152
Coordinates:
5127
- * __resample_dim__ (__resample_dim__ ) datetime64[ns] 2001-01-31 ... 2001-0...
5153
+ * time (time ) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
5128
5154
Data variables:
5129
- da (__resample_dim__ ) float64 1.0 2.0 nan
5155
+ da (time ) float64 1.0 2.0 nan
5130
5156
"""
5131
5157
return self ._reduce_without_squeeze_warn (
5132
5158
duck_array_ops .median ,
@@ -5343,6 +5369,19 @@ def cumprod(
5343
5369
class DataArrayGroupByAggregations :
5344
5370
_obj : DataArray
5345
5371
5372
+ def _reduce_without_squeeze_warn (
5373
+ self ,
5374
+ func : Callable [..., Any ],
5375
+ dim : Dims = None ,
5376
+ * ,
5377
+ axis : int | Sequence [int ] | None = None ,
5378
+ keep_attrs : bool | None = None ,
5379
+ keepdims : bool = False ,
5380
+ shortcut : bool = True ,
5381
+ ** kwargs : Any ,
5382
+ ) -> DataArray :
5383
+ raise NotImplementedError ()
5384
+
5346
5385
def reduce (
5347
5386
self ,
5348
5387
func : Callable [..., Any ],
@@ -6749,6 +6788,19 @@ def cumprod(
6749
6788
class DataArrayResampleAggregations :
6750
6789
_obj : DataArray
6751
6790
6791
+ def _reduce_without_squeeze_warn (
6792
+ self ,
6793
+ func : Callable [..., Any ],
6794
+ dim : Dims = None ,
6795
+ * ,
6796
+ axis : int | Sequence [int ] | None = None ,
6797
+ keep_attrs : bool | None = None ,
6798
+ keepdims : bool = False ,
6799
+ shortcut : bool = True ,
6800
+ ** kwargs : Any ,
6801
+ ) -> DataArray :
6802
+ raise NotImplementedError ()
6803
+
6752
6804
def reduce (
6753
6805
self ,
6754
6806
func : Callable [..., Any ],
@@ -7936,18 +7988,18 @@ def median(
7936
7988
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
7937
7989
7938
7990
>>> da.resample(time="3M").median()
7939
- <xarray.DataArray (__resample_dim__ : 3)>
7991
+ <xarray.DataArray (time : 3)>
7940
7992
array([1., 2., 2.])
7941
7993
Coordinates:
7942
- * __resample_dim__ (__resample_dim__ ) datetime64[ns] 2001-01-31 ... 2001-0...
7994
+ * time (time ) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
7943
7995
7944
7996
Use ``skipna`` to control whether NaNs are ignored.
7945
7997
7946
7998
>>> da.resample(time="3M").median(skipna=False)
7947
- <xarray.DataArray (__resample_dim__ : 3)>
7999
+ <xarray.DataArray (time : 3)>
7948
8000
array([ 1., 2., nan])
7949
8001
Coordinates:
7950
- * __resample_dim__ (__resample_dim__ ) datetime64[ns] 2001-01-31 ... 2001-0...
8002
+ * time (time ) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
7951
8003
"""
7952
8004
return self ._reduce_without_squeeze_warn (
7953
8005
duck_array_ops .median ,
@@ -8034,17 +8086,17 @@ def cumsum(
8034
8086
<xarray.DataArray (time: 6)>
8035
8087
array([1., 2., 5., 5., 2., 2.])
8036
8088
Coordinates:
8037
- * time (time) datetime64[ns] 2001-01-31 2001-02-28 ... 2001-06-30
8038
8089
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
8090
+ Dimensions without coordinates: time
8039
8091
8040
8092
Use ``skipna`` to control whether NaNs are ignored.
8041
8093
8042
8094
>>> da.resample(time="3M").cumsum(skipna=False)
8043
8095
<xarray.DataArray (time: 6)>
8044
8096
array([ 1., 2., 5., 5., 2., nan])
8045
8097
Coordinates:
8046
- * time (time) datetime64[ns] 2001-01-31 2001-02-28 ... 2001-06-30
8047
8098
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
8099
+ Dimensions without coordinates: time
8048
8100
"""
8049
8101
return self ._reduce_without_squeeze_warn (
8050
8102
duck_array_ops .cumsum ,
@@ -8131,17 +8183,17 @@ def cumprod(
8131
8183
<xarray.DataArray (time: 6)>
8132
8184
array([1., 2., 6., 0., 2., 2.])
8133
8185
Coordinates:
8134
- * time (time) datetime64[ns] 2001-01-31 2001-02-28 ... 2001-06-30
8135
8186
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
8187
+ Dimensions without coordinates: time
8136
8188
8137
8189
Use ``skipna`` to control whether NaNs are ignored.
8138
8190
8139
8191
>>> da.resample(time="3M").cumprod(skipna=False)
8140
8192
<xarray.DataArray (time: 6)>
8141
8193
array([ 1., 2., 6., 0., 2., nan])
8142
8194
Coordinates:
8143
- * time (time) datetime64[ns] 2001-01-31 2001-02-28 ... 2001-06-30
8144
8195
labels (time) <U1 'a' 'b' 'c' 'c' 'b' 'a'
8196
+ Dimensions without coordinates: time
8145
8197
"""
8146
8198
return self ._reduce_without_squeeze_warn (
8147
8199
duck_array_ops .cumprod ,
0 commit comments