Open jensdebruijn opened 1 year ago
Thanks for the suggestion @jensdebruijn! This is very well doable I think. Feel free to open a PR for this yourself. Otherwise we are also happy to pick this up ourselves, but likely not before the end of the year.
I suggest to improve the raster.full_like method with two new arguments
dtype=None
(see numpy.full_like) change dtype if not Nonefill_value=None
(actual fill_value similar to np.full_like). The current nodata
value will than be used to set the meta data only with raster.set_nodata
. If fill_value
one or nodata is not provide we assume these are the same (current behaviour).
Kind of request
Changing existing functionality
Enhancement Description
It would be great if in
hydromt.raster.full_like
you can pass alternative parameters, similar tonp.full_like
: https://numpy.org/doc/stable/reference/generated/numpy.full_like.htmlUse case
Freqently, I want to make a new hydromt raster similar to another, but with for example another data type. I am now doing this using hydromt.raster.full, but it would be more efficient and clean when I could use
hydromt.raster.full_like
.Additional Context
No response