Skip to content

Commit ea3ed87

Browse files
committed
Try fixing some typing
1 parent 092bfd9 commit ea3ed87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xarray/core/groupby.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ def _factorize_grouper(
303303
DataArray | IndexVariable | _DummyGroup,
304304
list[slice] | list[list[int]] | np.ndarray,
305305
np.ndarray,
306+
pd.Index,
306307
]:
307308
index = safe_cast_to_index(group)
308309
if not index.is_monotonic_increasing:
@@ -410,7 +411,7 @@ class GroupBy(Generic[T_Xarray]):
410411
def __init__(
411412
self,
412413
obj: T_Xarray,
413-
group: Hashable | DataArray | IndexVariable,
414+
group, #: Hashable | DataArray | IndexVariable,
414415
squeeze: bool = False,
415416
grouper: pd.Grouper | None = None,
416417
bins: ArrayLike | None = None,
@@ -479,6 +480,7 @@ def __init__(
479480
"dimension"
480481
)
481482

483+
self._codes: DataArray = None
482484
if grouper is not None:
483485
unique_coord, group_indices, codes, full_index = _factorize_grouper(
484486
group, grouper

0 commit comments

Comments
 (0)