stackstac.mosaic¶
-
stackstac.
mosaic
(arr, dim=None, axis=0, reverse=False)¶ Flatten a dimension of a
DataArray
by picking the first non-NaN pixel.The order of mosaicing is from last to first, meaning the last item is on top.
- Parameters
arr (
DataArray
) – TheDataArray
to mosaic.dim (
Union
[None
,Hashable
,Sequence
[Hashable
]]) – The dimension name to mosaic. Default: None.axis (
Union
[None
,int
,Sequence
[int
]]) – The axis number to mosaic. Default: 0. Only one ofdim
andaxis
can be given.reverse (
bool
) – If False (default), the last item along the dimension is on top. If True, the first item in the dimension is on top.
- Returns
The mosaicked
DataArray
.- Return type