hydromt.gis.raster_utils.full_like#
- hydromt.gis.raster_utils.full_like(other: DataArray, *, nodata: float | int | None = None, fill_value: float | int | None = None, dtype: type | None = None, lazy: bool = False) DataArray[source]#
Return a full object with the same grid and geospatial attributes as
other.- Parameters:
other (
xr.DataArray) – DataArray from which coordinates and attributes are taken.nodata (
float | int, optional) – No data value for the new DataArray, defaults to other.nodata or, if not set, to nan. By default None.fill_value (
float | int, optional) – Fill value of the new DataArray. If not provided the same value is used as the determined nodata value. By default None.dtype (
type, optional) – Data type, should be provided as a dtype defined by numpy (e.g. np.float32). By default None.lazy (
bool, optional) – If True return DataArray with a dask rather than numpy array, by default False.
- Returns:
da – Newly created DataArray with the same coordinates and attributes.
- Return type:
xr.DataArray