Skip to content

Commit ca71f62

Browse files
committed
Fix type hint for hexbin(reduce_C_function=...)
We only ever pass a list internally.
1 parent 3e5ecf9 commit ca71f62

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/axes/_axes.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class Axes(_AxesBase):
433433
alpha: float | None = ...,
434434
linewidths: float | None = ...,
435435
edgecolors: Literal["face", "none"] | ColorType = ...,
436-
reduce_C_function: Callable[[np.ndarray], float] = ...,
436+
reduce_C_function: Callable[[np.ndarray | list[float]], float] = ...,
437437
mincnt: int | None = ...,
438438
marginals: bool = ...,
439439
*,

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3101,7 +3101,7 @@ def hexbin(
31013101
alpha: float | None = None,
31023102
linewidths: float | None = None,
31033103
edgecolors: Literal["face", "none"] | ColorType = "face",
3104-
reduce_C_function: Callable[[np.ndarray], float] = np.mean,
3104+
reduce_C_function: Callable[[np.ndarray | list[float]], float] = np.mean,
31053105
mincnt: int | None = None,
31063106
marginals: bool = False,
31073107
*,

0 commit comments

Comments
 (0)