We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c359718 commit d522c0fCopy full SHA for d522c0f
sgkit/distarray.py
@@ -8,3 +8,9 @@
8
else:
9
# default to dask
10
from dask.array import * # noqa: F401, F403
11
+
12
+ # dask doesn't have a top-level astype required by the array API
13
+ def astype(x, dtype, /, *, copy=True): # pragma: no cover
14
+ if not copy and dtype == x.dtype:
15
+ return x
16
+ return x.astype(dtype=dtype, copy=copy)
0 commit comments