Skip to content

Commit 5c974a4

Browse files
committed
Delegate to dask directly
1 parent ebcec0e commit 5c974a4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/array_api_extra/_delegation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ def quantile(
325325

326326
xp = array_namespace(x, q) if xp is None else xp
327327

328+
if is_dask_namespace(xp):
329+
return xp.quantile(x, q, axis=axis, keepdims=keepdims, method=method)
330+
328331
try:
329332
import scipy # type: ignore[import-untyped]
330333
from packaging import version

src/array_api_extra/_lib/_quantile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def quantile(
3737

3838
# Promote to common dtype
3939
x = xp.astype(x, xp.float64)
40-
q_arr = xp.astype(q_arr, xp.float64)
41-
q_arr = xp.asarray(q_arr, device=_compat.device(x))
40+
q_arr = xp.asarray(q_arr, xp.float64, device=_compat.device(x))
4241

4342
dtype = x.dtype
4443
axis_none = axis is None

0 commit comments

Comments
 (0)