Skip to content

Commit eef3366

Browse files
committed
Mypy errors don't go away just because I didn't check them
1 parent 5a101c3 commit eef3366

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

pandas/core/array_algos/quantile.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,14 @@ def _nanquantile_1d(
142142
# equiv: 'np.array([na_value] * len(qs))' but much faster
143143
return np.full(len(qs), na_value)
144144

145-
return np.quantile(values, qs, method=interpolation)
145+
return np.quantile(
146+
values,
147+
qs,
148+
# error: No overload variant of "percentile" matches argument
149+
# types "ndarray[Any, Any]", "ndarray[Any, dtype[floating[_64Bit]]]"
150+
# , "Dict[str, str]" [call-overload]
151+
method=interpolation, # type: ignore[call-overload]
152+
)
146153

147154

148155
def _nanquantile(
@@ -208,4 +215,12 @@ def _nanquantile(
208215
result = result.astype(values.dtype, copy=False)
209216
return result
210217
else:
211-
return np.quantile(values, qs, axis=1, method=interpolation)
218+
return np.quantile(
219+
values,
220+
qs,
221+
axis=1,
222+
# error: No overload variant of "percentile" matches argument types
223+
# "ndarray[Any, Any]", "ndarray[Any, dtype[floating[_64Bit]]]",
224+
# "int", "Dict[str, str]" [call-overload]
225+
method=interpolation, # type: ignore[call-overload]
226+
)

0 commit comments

Comments
 (0)