-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a splitdims? #877
Comments
Or maybe even |
We have |
I had a look, but it only works for |
Okay I tried this approach and this is the best I could do with A = rand(X(1:0.01:2), Ti(tempo))
B = minimum.(groupby(A, Ti=>yearmonth))
C = rebuild(B, dims = (Ti(Rasters.DD.MergedLookup(val(lookup(dims(B, Ti))), (Dim{:year}(1:2), Dim{:month}(1:12)))),))
unmergedims(C, (:year, :month))
|
Yeah that's too hard. let's make |
I realized that this is in some ways similar to #739 - maybe we can use some of the internals? The dims to be split are kind of like table columns (and they could also miss some values etc). |
Would it be worth having something that is effectively the opposite of
mergedims
- to split dims withTuple
eltype into two separate dims?Just to come with an example from the documentation:
This now leaves us with a
Sampled{Tuple{Int64, Int64}}
Ti dimension. I think it'd be neat to be able to dosplitdims(B, Ti => (:year, :month))
The text was updated successfully, but these errors were encountered: