Skip to content

Commit

Permalink
Add assert
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Oct 25, 2023
1 parent b666563 commit a8a5412
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -5844,6 +5844,7 @@ def _wrap_idxmax_idxmin(self, res: NDFrameT) -> NDFrameT:
if isinstance(index, MultiIndex):
index = index.to_flat_index()
values = res._values
assert isinstance(values, np.ndarray)
na_value = na_value_for_dtype(index.dtype, compat=False)
if isinstance(res, Series):
# mypy: expression has type "Series", variable has type "NDFrameT"
Expand Down

0 comments on commit a8a5412

Please sign in to comment.