File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -996,14 +996,10 @@ def _resample(
996
996
if base is not None and offset is not None :
997
997
raise ValueError ("base and offset cannot be present at the same time" )
998
998
999
- index = self ._indexes [dim_name ].to_pandas_index ()
1000
999
if base is not None :
1000
+ index = self ._indexes [dim_name ].to_pandas_index ()
1001
1001
offset = _convert_base_to_offset (base , freq , index )
1002
1002
1003
- name = RESAMPLE_DIM
1004
- group = DataArray (
1005
- dim_coord , coords = dim_coord .coords , dims = dim_coord .dims , name = name
1006
- )
1007
1003
grouper = TimeResampleGrouper (
1008
1004
freq = freq ,
1009
1005
closed = closed ,
@@ -1012,6 +1008,11 @@ def _resample(
1012
1008
offset = offset ,
1013
1009
loffset = loffset ,
1014
1010
)
1011
+
1012
+ group = DataArray (
1013
+ dim_coord , coords = dim_coord .coords , dims = dim_coord .dims , name = RESAMPLE_DIM
1014
+ )
1015
+
1015
1016
rgrouper = ResolvedTimeResampleGrouper (grouper , group , self )
1016
1017
1017
1018
return resample_cls (
You can’t perform that action at this time.
0 commit comments