Problem
Both hotspots() and emerging_hotspots() support 3 of 4 backends but are missing dask+cupy:
# focal.py line 1223
dask_cupy_func=lambda *args: not_implemented_func(
*args, messages='hotspots() does not support dask with cupy backed DataArray.'),
# emerging_hotspots.py line 601
dask_cupy_func=lambda *args: not_implemented_func(
messages='emerging_hotspots() does not support dask+cupy backed DataArray.',
Why This Should Be Straightforward
- The cupy backends for both already exist (
_hotspots_cupy, _emerging_hotspots_cupy).
- The dask+numpy backends also exist and use
map_overlap.
- The same file (
focal.py) already has a working dask+cupy implementation for mean() at line 80 that demonstrates the pattern.
- The missing piece is combining these:
map_overlap with cupy chunk functions and cupy meta arrays.
Proposed Fix
hotspots: implement _hotspots_dask_cupy() following the _mean_dask_cupy() pattern.
emerging_hotspots: implement _emerging_hotspots_dask_cupy() similarly.
- Update README feature matrix: add ✅ for Hotspots dask GPU column.
Impact
Hotspot analysis is critical for spatial epidemiology, crime analysis, and environmental monitoring — compute-intensive operations where GPU provides the most benefit.
Problem
Both
hotspots()andemerging_hotspots()support 3 of 4 backends but are missing dask+cupy:Why This Should Be Straightforward
_hotspots_cupy,_emerging_hotspots_cupy).map_overlap.focal.py) already has a working dask+cupy implementation formean()at line 80 that demonstrates the pattern.map_overlapwith cupy chunk functions and cupy meta arrays.Proposed Fix
hotspots: implement_hotspots_dask_cupy()following the_mean_dask_cupy()pattern.emerging_hotspots: implement_emerging_hotspots_dask_cupy()similarly.Impact
Hotspot analysis is critical for spatial epidemiology, crime analysis, and environmental monitoring — compute-intensive operations where GPU provides the most benefit.