Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Sep 15, 2023
1 parent 75bde4b commit 587a054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ def array_func(values: ArrayLike) -> ArrayLike:
# TODO: avoid special casing SparseArray here
if how in ["any", "all"] and isinstance(values, SparseArray):
pass
if alt is None or how in ["any", "all", "std", "sem"]:
elif alt is None or how in ["any", "all", "std", "sem"]:
raise # TODO: re-raise as TypeError? should not be reached
else:
return result
Expand Down Expand Up @@ -3337,7 +3337,7 @@ def _idxmin_idxmax(
def post_process(res):
has_na_value = (res._values == -1).any(axis=None)
has_unobserved = not seen.all()
raise_err = not ignore_unobserved and has_unobserved
raise_err: bool | np.bool_ = not ignore_unobserved and has_unobserved
if (
not self.observed
and not ignore_unobserved
Expand Down

0 comments on commit 587a054

Please sign in to comment.