Skip to content

Commit 80113d6

Browse files
committed
fix
1 parent 6629004 commit 80113d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_compat/dask/array/_aliases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from ..._internal import get_xp
77

8+
from . import numpy as np_compat
89
from ._info import __array_namespace_info__
910

1011
import numpy as np
@@ -143,7 +144,7 @@ def asarray(
143144

144145
# copy=None to be uniform across dask < 2024.12 and >= 2024.12
145146
# see https://github.com/dask/dask/pull/11524/
146-
obj = np.asarray(obj, dtype=dtype, copy=True)
147+
obj = np_compat.asarray(obj, dtype=dtype, copy=True)
147148
return da.from_array(obj)
148149

149150

@@ -183,7 +184,6 @@ def _isscalar(a):
183184
max_shape = () if _isscalar(max) else max.shape
184185

185186
# TODO: This won't handle dask unknown shapes
186-
import numpy as np
187187
result_shape = np.broadcast_shapes(x.shape, min_shape, max_shape)
188188

189189
if min is not None:

0 commit comments

Comments
 (0)