Skip to content

Commit ec58458

Browse files
committed
lower dask
1 parent 00f3e46 commit ec58458

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ overrides.matrix.resolution.features = [
9999
]
100100
overrides.matrix.resolution.dependencies = [
101101
# TODO: move to min dep once this is fixed: https://github.com/tlambert03/hatch-min-requirements/issues/5
102-
{ if = [ "lowest" ], value = "dask==2024.10.0" },
102+
{ if = [ "lowest" ], value = "dask==2023.5.1" },
103103
]
104104

105105
[[tool.hatch.envs.hatch-test.matrix]]

src/fast_array_utils/_plugins/dask.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# SPDX-License-Identifier: MPL-2.0
22
from __future__ import annotations
33

4-
from dask.array.dispatch import concatenate_lookup, take_lookup, tensordot_lookup
4+
from dask.array.dispatch import concatenate_lookup, tensordot_lookup
55
from scipy.sparse import sparray, spmatrix
66

77

8+
try:
9+
from dask.array.dispatch import take_lookup
10+
except ImportError:
11+
take_lookup = None
12+
13+
814
# TODO(flying-sheep): upstream
915
# https://github.com/dask/dask/issues/11749
1016
def patch() -> None: # pragma: no cover
@@ -18,4 +24,5 @@ def patch() -> None: # pragma: no cover
1824

1925
concatenate_lookup.register(sparray, concatenate_lookup.dispatch(spmatrix))
2026
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))

0 commit comments

Comments
 (0)