Skip to content

Commit c6cce57

Browse files
committed
temp array-api-compat changes to be upstreamed
1 parent 5affae5 commit c6cce57

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

array_api_compat/common/_helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,15 @@ def your_function(x, y):
519519
import torch
520520
namespaces.add(torch)
521521
elif is_dask_array(x):
522-
if _use_compat:
522+
# dask main namespace is not array APi compatible
523+
# so return namespace from array-api-compat unless
524+
# explicitly requested otherwise
525+
if _use_compat or _use_compat is None:
523526
_check_api_version(api_version)
524527
from ..dask import array as dask_namespace
525528
namespaces.add(dask_namespace)
526-
else:
529+
elif _use_compat is False:
530+
print("why am i false")
527531
import dask.array as da
528532
namespaces.add(da)
529533
elif is_jax_array(x):

0 commit comments

Comments
 (0)