Skip to content

Commit 7c18a82

Browse files
committed
return max values when all weights are null
1 parent 0353767 commit 7c18a82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array_api_extra/_lib/_quantile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _weighted_quantile_sorted_1d( # numpydoc ignore=GL08
170170
i = xp.clip(i, 0, n - 1)
171171
i = xp.take(sorter, i)
172172

173-
q0 = q == 0.0
173+
q0 = t == 0.0
174174
if average or xp.any(q0):
175175
j = xp.searchsorted(cdf, t, side="right")
176176
j = xp.clip(j, 0, n - 1)

0 commit comments

Comments
 (0)