xarray.full_like

xarray.full_like(other, fill_value, dtype: Union[numpy.dtype, str, None] = None)

Return a new object with the same shape and type as a given object.

Parameters
otherDataArray, Dataset, or Variable

The reference object in input

fill_valuescalar

Value to fill the new object with before returning it.

dtypedtype, optional

dtype of the new array. If omitted, it defaults to other.dtype.

Returns
outsame as object

New object with the same shape and type as other, with the data filled with fill_value. Coords will be copied from other. If other is based on dask, the new one will be as well, and will be split in the same chunks.