Are there any helper functions for extending a dimension of an DimArray
I have a DimArray
da = rand(X(1:10), Y(1:10))
And later in my workflow I'd like add values at X == 11. Right now that looks like:
da2 = fill(NaN, X(1:11), Y(1:10)) da2[At(1:10), : ] = da; da = da2
This looks a bit uglier as the number of dims grow. I'm wondering if my current approach is best practice or if there is a helper function (that I haven't been able to find) to simplify this operation as I'm guessing this operation is relatively common.
~cat(da1, da2; dims=X) ?~
(Hmm maybe I don't totally get what you're doing)
Rasters has extend, maybe that's what you want.
I guess Rasters should just accept any AbstractDimArray, the problem is what to use for the missing values
Could always force a kwarg fill...
cat() is what I was looking for, thanks.
da = rand(X(1:10), Y(1:10))
da2 = fill(NaN, X(11:11), Y(1:10))
da = cat(da, da2, dims=:X)
This would still be nice to have
We could move extend here I guess.