You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fitting or optimization workflows, it’s common to work with a structured ComponentArray template and update only a subset of its parameters during each iteration. While manual assignment is always possible using field names or indices, it’s often verbose and error-prone.
I'd like to have a utility function that enables updating parameters by name using existing axis metadata, without reconstructing the structure or altering types.
Motivation
In fitting or optimization workflows, it’s common to work with a structured
ComponentArray
template and update only a subset of its parameters during each iteration. While manual assignment is always possible using field names or indices, it’s often verbose and error-prone.I'd like to have a utility function that enables updating parameters by name using existing axis metadata, without reconstructing the structure or altering types.
Proposed Functionality
Introduce
update_component_array(default, update)
that:ComponentArray
default with values from anotherComponentArray
updateExample Usage
Btw
Originally, I tried to implement
deep_merge
, but it's really hard to make it type stable. I'd be happy to have theupdate
solutionThe text was updated successfully, but these errors were encountered: