File tree 1 file changed +4
-3
lines changed 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ def ids(self) -> np.ndarray:
762
762
@cache_readonly
763
763
def result_index_and_ids (self ) -> tuple [Index , np .ndarray ]:
764
764
names = self .names
765
- codes = [ensure_platform_int ( ping .codes ) for ping in self .groupings ]
765
+ codes = [ping .codes for ping in self .groupings ]
766
766
levels = [Index ._with_infer (ping .uniques ) for ping in self .groupings ]
767
767
obs = [
768
768
ping ._observed or not ping ._passed_categorical for ping in self .groupings
@@ -807,10 +807,10 @@ def result_index_and_ids(self) -> tuple[Index, np.ndarray]:
807
807
808
808
if all (obs ):
809
809
result_index = ob_index
810
- ids = ob_ids
810
+ ids = ensure_platform_int ( ob_ids )
811
811
elif not any (obs ):
812
812
result_index = unob_index
813
- ids = unob_ids
813
+ ids = ensure_platform_int ( unob_ids )
814
814
else :
815
815
# Combine unobserved and observed parts of result_index
816
816
unob_indices = [k for k , e in enumerate (obs ) if not e ]
@@ -841,6 +841,7 @@ def result_index_and_ids(self) -> tuple[Index, np.ndarray]:
841
841
[uniques , np .delete (np .arange (len (result_index )), uniques )]
842
842
)
843
843
result_index = result_index .take (taker )
844
+ ids = ensure_platform_int (ids )
844
845
845
846
return result_index , ids
846
847
You can’t perform that action at this time.
0 commit comments