Skip to content

Commit 6b11b2b

Browse files
committed
Wrap dask.array by default since it is not Array API Compatible
1 parent cdd1c8d commit 6b11b2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

array_api_compat/common/_helpers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,10 @@ def your_function(x, y):
521521
import torch
522522
namespaces.add(torch)
523523
elif is_dask_array(x):
524-
if _use_compat:
524+
# dask main namespace is not array API compatible
525+
# so return namespace from array-api-compat unless
526+
# explicitly requested otherwise
527+
if _use_compat or _use_compat is None:
525528
_check_api_version(api_version)
526529
from ..dask import array as dask_namespace
527530
namespaces.add(dask_namespace)

0 commit comments

Comments
 (0)