File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
src/fast_array_utils/_plugins Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ overrides.matrix.extras.dependencies = [
97
97
overrides.matrix.resolution.features = [
98
98
{ if = [ " lowest" ], value = " min-reqs" }, # feature added by hatch-min-requirements
99
99
]
100
+ overrides.matrix.resolution.dependencies = [
101
+ # TODO: move to min dep once this is fixed: https://github.com/tlambert03/hatch-min-requirements/issues/5
102
+ { if = [ " lowest" ], value = " dask==2023.5.1" },
103
+ ]
100
104
101
105
[[tool .hatch .envs .hatch-test .matrix ]]
102
106
python = [ " 3.13" , " 3.11" ]
Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: MPL-2.0
2
2
from __future__ import annotations
3
3
4
- from dask .array .dispatch import concatenate_lookup , take_lookup , tensordot_lookup
4
+ from dask .array .dispatch import concatenate_lookup , tensordot_lookup
5
5
from scipy .sparse import sparray , spmatrix
6
6
7
7
8
+ try :
9
+ from dask .array .dispatch import take_lookup
10
+ except ImportError :
11
+ take_lookup = None
12
+
13
+
8
14
# TODO(flying-sheep): upstream
9
15
# https://github.com/dask/dask/issues/11749
10
16
def patch () -> None : # pragma: no cover
@@ -13,9 +19,10 @@ def patch() -> None: # pragma: no cover
13
19
See <https://github.com/dask/dask/blob/d9b5c5b0256208f1befe94b26bfa8eaabcd0536d/dask/array/backends.py#L239-L241>
14
20
"""
15
21
# Avoid patch if already patched or upstream support has been added
16
- if concatenate_lookup .dispatch (sparray ) is not concatenate_lookup .dispatch (spmatrix ):
22
+ if concatenate_lookup .dispatch (sparray ) is concatenate_lookup .dispatch (spmatrix ):
17
23
return
18
24
19
25
concatenate_lookup .register (sparray , concatenate_lookup .dispatch (spmatrix ))
20
26
tensordot_lookup .register (sparray , tensordot_lookup .dispatch (spmatrix ))
21
- take_lookup .register (sparray , take_lookup .dispatch (spmatrix ))
27
+ if take_lookup is not None :
28
+ take_lookup .register (sparray , take_lookup .dispatch (spmatrix ))
You can’t perform that action at this time.
0 commit comments