-
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
Merging of ComponentArrays #69
Comments
There is sorta a way to handle this already by passing in an existing julia> ca1 = ComponentVector(a=1, b=2, c=3);
julia> ComponentArray(ca1; new=222, a=20)
ComponentVector{Int64}(a = 20, b = 2, c = 3, new = 222) One of the problems with doing it this way is there is no easy way to splat new fields from another |
Thanks a lot, that's good to know! Does the problem with splatting of new fields you mentioned relate to this: ca = ComponentVector(a=(a1=1, a2=2), b=(b1=33, b2=44), c=555)
ComponentArray(ca; c = 5, new=222, a=(a2=33, a1=99)) # doesn't work |
Yes, I PR would be much appreciated. Yeah, that's part of it. Having a |
Just for reference: |
Thanks for the really useful package! It has helped a lot to clean up our model code.
One functionality I missed is to
merge
component arrays. With tuples we can do:I can simulate this behavior, but I think my implementation is not very optimal:
A good use case would be optimizing some parameters while keeping others fix:
The text was updated successfully, but these errors were encountered: