Skip to content

Commit 1ea8349

Browse files
committed
Fix NumPy typecheck errors.
1 parent 5fd8334 commit 1ea8349

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pybroker/eval.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,9 @@ def iqr(values: NDArray[np.float64]) -> float:
453453
x = values[~np.isnan(values)]
454454
if not len(x):
455455
return 0
456-
percentiles = tuple(np.percentile(x, [75, 25], method="midpoint"))
456+
percentiles: NDArray[np.float64] = np.percentile(
457+
x, [75, 25], method="midpoint"
458+
)
457459
q75: float = float(percentiles[0])
458460
q25: float = float(percentiles[1])
459461
return q75 - q25

0 commit comments

Comments
 (0)