Open felixcremer opened 1 year ago
Actually this should not be necessary. I had a similar discussion with @gdkrmr yesterday and thought output types were automatically widened to allow missings here. Does your output array not allow missings when you simply set outtype to Float32?
Now that we allow the use of NaN instead of missing, I think we should not automatically use a Union{Missing, ....}
any if the user wants to use missing, they can specify outtype = Union{Missing, Float32}
.
Of course this is a breaking change and should not be done tomorrow but in the next major release.
I am currently trying to use the result of a mapcube in the ImageMorphology package which expects an AbstractArray{Int,2} and can't deal with missing. For these use cases, I think it would be good to not automatically widen the outtype to Union{Missing, ...} when the user specifies it explicitely, because it is also unintuitive, that the outtype is not what I set in the OutDims constructor.
I am trying to map a function which does not work out for all input pixels over a data cube which does not have Missing values. I wanted to convey the To allow for missing values in the output cube I tried to use the outtype keyword argument, but I get the following error:
Can we just widen the allowed type for the outtype value in OutDims?