Commit 5a5c298
authored
Fix cost_distance leaking dask task name as output .name (#3349)
* Fix cost_distance leaking dask task name as output .name (#3344)
The dask+numpy and dask+cupy backends surfaced the internal dask graph
name (e.g. _trim-... from map_overlap, asarray-... from dask+cupy) as
the returned DataArray .name, while numpy and cupy returned name=None.
Force the result name to the input raster's name with .rename() so all
four backends agree. Passing name= to the constructor is insufficient
because xarray treats name=None as 'infer from data'.
Adds a parametrized regression test across all four backends and both
named and unnamed inputs.
* Record cost_distance metadata sweep in state CSV (#3344)1 parent 4debca2 commit 5a5c298
3 files changed
Lines changed: 56 additions & 16 deletions
0 commit comments