-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Help wanted] Add dimension #453
Comments
You would need to add a dimension to the array at the same time or it wont match? But why no instead index with a range or vector:
Then you wont lose the dimension |
Oh ! That's clever. I hadn't thought of that. It works as expected. Thank you. For the second question: Does RasterStack could be the solution ? |
Yeah its a little harder... With a base julia> zeros(2, 2)[:, :, :]
2×2×1 Array{Float64, 3}:
[:, :, 1] =
0.0 0.0
0.0 0.0 But here you also want to add a dimension. This should work fine if your array is a matrix: subDs = rebuild(subDs; data=parent(subDs)[:, :, :], dims=(dims(subDs..., Ti(time))) Its not a very common thing to do, so I'm not sure if it needs a function in DD. (More common is using |
I would like to add a dimension to a raster object.
Currently i do this:
Today, this code give me this error:
(dims has the X and Y dimensions)
The text was updated successfully, but these errors were encountered: