Closed SarahAlidoost closed 1 month ago
Hi Sarah, thanks for raising this issue. This is not the intended behavior.
It turns out there are two problems:
.where
which will cast data to a floating point number so NaN can be used.fill_value
kwarg to regrid.most_common
, so no fill value can be passed by the user.
It seems that
da.regrid.most_common(...)
changes thedtype
of da fromuint8
tofloat32
. Is this change needed? I tested this issue using demo notebook, just inspectdtype
before and after regrid.