
Elementwise map over one or more aligned rasters.
lazy_map.Rdfn receives one traced array per input raster and returns one
array; it runs fused with adjacent operations in one compiled
kernel. Write it with plain arithmetic and the g_* vocabulary
(g_ifelse(), g_bitand(), g_cast(), ...). Inputs must share a
grid (align() first otherwise); rasters on different graphs merge
automatically.
Details
The output dtype defaults to the promoted input dtype; pass
dtype when fn changes the value domain, e.g. "f32" for a mask
that introduces NaN over an integer band.
Over a LazyDataset, fn is applied to every value band (a single dataset
input only); bands restricts which bands, and non-selected bands pass
through unchanged.