Skip to content

Commit b17ad3d

Browse files
committed
Fix ocean-fill NaN replacement crashing on dask-backed rasters
Use the already-computed numpy array (base_np) instead of copying the raw raster data, which may be a dask array that doesn't support boolean mask assignment.
1 parent 55aa4b5 commit b17ad3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rtxpy/engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ def __init__(self, raster, width: int = 800, height: int = 600,
15981598
new_data = self._base_raster.data.copy()
15991599
new_data[cp.asarray(ocean_fill)] = cp.nan
16001600
else:
1601-
new_data = self._base_raster.data.copy()
1601+
new_data = base_np.copy()
16021602
new_data[ocean_fill] = np.nan
16031603
self._base_raster = self._base_raster.copy(data=new_data)
16041604
# Re-derive working raster from updated base

0 commit comments

Comments
 (0)