Skip to content

Commit bb457d8

Browse files
silence error introduced in pandas-dev#28878
1 parent 537c458 commit bb457d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/groupby/generic.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,10 @@ def _cython_agg_blocks(self, how, alt=None, numeric_only=True, min_count=-1):
982982
# see if we can cast the block back to the original dtype
983983
result = maybe_downcast_numeric(result, block.dtype)
984984

985-
if result.ndim == 1 and isinstance(result, np.ndarray):
985+
# error: "object" has no attribute "ndim" [attr-defined]
986+
if result.ndim == 1 and isinstance( # type: ignore[attr-defined]
987+
result, np.ndarray
988+
):
986989
# e.g. block.values was an IntegerArray
987990
try:
988991
# Cast back if feasible

0 commit comments

Comments
 (0)