Skip to content

Commit a38f3e1

Browse files
authored
Fix typing issues for CI (#42770)
1 parent 8e07787 commit a38f3e1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pandas/core/groupby/groupby.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@ def _get_cythonized_result(
28962896
grouper = self.grouper
28972897

28982898
ids, _, ngroups = grouper.group_info
2899-
output: dict[base.OutputKey, np.ndarray] = {}
2899+
output: dict[base.OutputKey, ArrayLike] = {}
29002900

29012901
base_func = getattr(libgroupby, how)
29022902
base_func = partial(base_func, labels=ids)
@@ -2911,6 +2911,7 @@ def blk_func(values: ArrayLike) -> ArrayLike:
29112911
else:
29122912
result_sz = len(values)
29132913

2914+
result: ArrayLike
29142915
result = np.zeros(result_sz, dtype=cython_dtype)
29152916
if needs_2d:
29162917
result = result.reshape((-1, 1))

pandas/core/reshape/tile.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,11 @@ def _bins_to_cuts(
418418
bins = unique_bins
419419

420420
side = "left" if right else "right"
421-
ids = ensure_platform_int(bins.searchsorted(x, side=side))
421+
# error: No overload variant of "searchsorted" of "ndarray" matches
422+
# argument types "Any", "str"
423+
ids = ensure_platform_int(
424+
bins.searchsorted(x, side=side) # type: ignore[call-overload]
425+
)
422426

423427
if include_lowest:
424428
ids[np.asarray(x) == bins[0]] = 1

0 commit comments

Comments
 (0)