File tree 1 file changed +12
-12
lines changed 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,19 @@ def __init__(self, mod):
43
43
self .available = duck_array_module is not None
44
44
45
45
46
+ dsk = DuckArrayModule ("dask" )
47
+ dask_version = dsk .version
48
+ dask_array_type = dsk .type
49
+
50
+ sp = DuckArrayModule ("sparse" )
51
+ sparse_array_type = sp .type
52
+ sparse_version = sp .version
53
+
54
+ cupy_array_type = DuckArrayModule ("cupy" ).type
55
+
56
+
46
57
def is_dask_collection (x ):
47
- if DuckArrayModule ( "dask" ) .available :
58
+ if dsk .available :
48
59
from dask .base import is_dask_collection
49
60
50
61
return is_dask_collection (x )
@@ -54,14 +65,3 @@ def is_dask_collection(x):
54
65
55
66
def is_duck_dask_array (x ):
56
67
return is_duck_array (x ) and is_dask_collection (x )
57
-
58
-
59
- dsk = DuckArrayModule ("dask" )
60
- dask_version = dsk .version
61
- dask_array_type = dsk .type
62
-
63
- sp = DuckArrayModule ("sparse" )
64
- sparse_array_type = sp .type
65
- sparse_version = sp .version
66
-
67
- cupy_array_type = DuckArrayModule ("cupy" ).type
You can’t perform that action at this time.
0 commit comments