File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,7 @@ def _factorize_grouper(
303
303
DataArray | IndexVariable | _DummyGroup ,
304
304
list [slice ] | list [list [int ]] | np .ndarray ,
305
305
np .ndarray ,
306
+ pd .Index ,
306
307
]:
307
308
index = safe_cast_to_index (group )
308
309
if not index .is_monotonic_increasing :
@@ -410,7 +411,7 @@ class GroupBy(Generic[T_Xarray]):
410
411
def __init__ (
411
412
self ,
412
413
obj : T_Xarray ,
413
- group : Hashable | DataArray | IndexVariable ,
414
+ group , # : Hashable | DataArray | IndexVariable,
414
415
squeeze : bool = False ,
415
416
grouper : pd .Grouper | None = None ,
416
417
bins : ArrayLike | None = None ,
@@ -479,6 +480,7 @@ def __init__(
479
480
"dimension"
480
481
)
481
482
483
+ self ._codes : DataArray = None
482
484
if grouper is not None :
483
485
unique_coord , group_indices , codes , full_index = _factorize_grouper (
484
486
group , grouper
You can’t perform that action at this time.
0 commit comments